# [seqfan] Re: definition of A074074

Richard Mathar mathar at strw.leidenuniv.nl
Sun Sep 20 00:55:28 CEST 2009

```I think the intended description is roughly:
Numbers D such that in the solutions to x^2-D*y^2=1, where N=2n+1, scanned
for D=N^2-M^2 with variable M=2m even, 1<=m<=n, the value of x is minimized.
In a Maple implementation, one would use the convergents associated with
the continued fraction of sqrt(D) to get the x as the numerators:

A074074 := proc(n)
N := 2*n+1 ;
msol := 10000 ;
mD := 10000 ;
for M from 2 to 2*n by 2  do
Dcap := N^2-M^2 ;
if not issqr(Dcap) then
c := numtheory[cfrac](sqrt(Dcap)) ;
for i from 1 do
try
fr := numtheory[nthconver](c,i) ;
nu := numer(fr) ;
de := denom(fr) ;
if nu^2-Dcap*de^2=1 then
# print("n=",n,"D=",Dcap,"i=",i,fr, nu^2-Dcap*de^2) ;
if nu < msol then
msol := nu;
mD := Dcap;
fi;
break;
fi;
catch:
break;
end try:
od:
fi;
od:
m := sqrt(N^2-mD)/2 ;
# print("n=",n,"D=",mD,"m=",m) ;
mD ;
end:
for n from 1 do
printf("%d %d\n",n,A074074(n)) ;
od:

which gives
1 5
2 21
3 33
4 17
5 105
6 105
7 189
8 33
9 105
10 405
11 333
12 141
13 473
14 57
15 817
16 189
17 325
18 885
19 77
20 1425
21 1173
22 1925
23 1425
24 2301
25 101
26 105
27 1425
28 333
29 777
30 1785
31 2525
32 381
....

The intended (but as I argued before, failing) connection to A074076 is that
a parametrization of the sides a=2*u*M, b=N*u+M, c=N*u-M leads to an area of
the form A = u*M*sqrt(u^2-1)*sqrt(D) where D=N^2-M^2. Now setting
sqrt(u^2-1)*sqrt(D) = v*D leads to u^2-D*v^2=1. The error in the assumption
is probably that in the correct solutions to the minimization problem
in A074076, neither v nor u need to be integer.

Richard

```