OFFSET
1,1
COMMENTS
Computed from Perron's table (see reference p. 108, for n = 1..28) which gives the minimal x,y values for the Diophantine eq. x^2 - x*y - ((D(n)-1)/4)*y^2= +1, resp., -1 if D(n)=A077425(n), resp, D(n)=A077425(n) and D(n) also in A077426.
The conversion from the x,y values of Perron's table to the minimal a=a(n) and b=b(n) solutions of a^2 - D(n)*b^2 =+4 is as follows. If D(n)=A077425(n) but not from A077426 (period length of continued fraction of (sqrt(D(n))+1)/2 is even) then a(n)=2*x(n)-y(n) and b(n)=y(n). E.g. D(4)=21 with Perron's (x,y)=(3,1) and (a,b)=(5,1). 1=b(4)=A078355(4). If D(n)=A077425(n) appears also in A077426 (odd period length of continued fraction of (sqrt(D(n))+1)/2) then a(n)=(2*x-y)^2+2 and b(n)=(2*x-y)*y. E.g. D(7)=37 with Perron's (x,y)=(7,2) leading to (a,b)=(146,24) with 24=b(7)=A078355(7).
The generic D(n) values are those from A078371(k-1) := (2*k+3)*(2*k-1), for k>=1, which are 5 (mod 8). For such D values the minimal solution is (a(n),b(n))=(2*k+1,1) (e.g. D(16)=77= A078371(3) with a(16)=2*4+1=9 and b(16)=A078355(16)=1).
The general solution of Pell a^2-D(n)*b^2 = +4 with generic D(n)=A077425(n)=A078371(k-1), k>=1, is a(n,m)= 2*T(m+1,(2*k+1)/2) and b(n,m)= S(m,2*k+1), m>=0, with T(n,x), resp. S(n,x), Chebyshev's polynomials of the first, resp. second, kind. See A053120 resp. A049310.
For non-generic D(n) (not from A078371) the general solution of a^2-D(n)*b^2 = +4 is a(n,m)= 2*T(m+1,a(n)/2) and b(n,m)= b(n)*S(m,a(n)), m>=0, with Chebyshev's polynomials and in this case b(n)>1.
REFERENCES
O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 30, Satz 3.35, p. 109 and table p. 108).
LINKS
S. R. Finch, Class number theory
Steven R. Finch, Class number theory [Cached copy, with permission of the author]
MATHEMATICA
d = Select[Range[5, 300, 4], !IntegerQ[Sqrt[#]]&]; a[n_] := Module[{a, b, r}, a /. {r = Reduce[a > 0 && b > 0 && a^2 - d[[n]]*b^2 == 4, {a, b}, Integers]; (r /. C[1] -> 0) || (r /. C[1] -> 1) // ToRules} // Select[#, IntegerQ, 1] &] // First; Table[a[n], {n, 1, 43}] (* Jean-François Alcover, Jul 30 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Wolfdieter Lang, Nov 29 2002
EXTENSIONS
More terms from Max Alekseyev, Mar 03 2010
STATUS
approved