OFFSET
1,3
COMMENTS
This equation can also be written as (2*b(n)-a(n))^2 - D(n)*a(n)^2 = +4 or -4 with D(n) := A077425(n)=1+4*G(n).
This is from Perron's table (see reference p. 108, for n = 1..28) which gives the minimal x,y values which solve the above mentioned Diophantine equations.
REFERENCES
O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 30, Satz 3.35, p. 109 and table p. 108).
MATHEMATICA
g[n_] := Ceiling[ Sqrt[n] ] + n - 1; r[n_] := Reduce[an > 0 && (bn^2 - bn *an - g[n]*an^2 == 1 || bn^2 - bn *an - g[n]*an^2 == - 1), {an, bn}, Integers] /. C -> c; ab[n_] := DeleteCases[ Flatten[ Table[{an, bn} /. {ToRules[r[n]]} // Simplify, {c[1], 0, 1}] , 1] , an | bn]; a[n_] := a[n] = Min[ ab[n][[All, 1]] ]; Table[ Print[{n, a[n]}]; a[n], {n, 1, 65}] (* Jean-François Alcover, Oct 03 2012 *)
PROG
(PARI) forstep(D=1, 1000, 4, if(issquare(D), next); u=bnfinit(x^2-D).fu[1]; k=1; while( denominator(t=polcoeff(lift(u^k), 1)*2)>1, k++); print1(abs(t), ", "); ) \\ Max Alekseyev, Feb 06 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Wolfdieter Lang, Nov 29 2002
EXTENSIONS
More terms from Max Alekseyev, Feb 06 2010
STATUS
approved