OFFSET
1,1
COMMENTS
All numbers of the form (5n+1)^2 + 4n + 1 for n>0 are elements of this sequence. Numbers of the above form have the continued fraction expansion [5n+1,[2,2,10n+2]]. General square roots of integers with period 3 continued fraction expansions have expansions of the form [n,[2m,2m,2n]]. - David Terr, Jun 15 2004
REFERENCES
Kenneth H. Rosen, Elementary Number Theory and Its Applications, Addison-Wesley, 1984, page 426 (but beware of errors in this reference!)
LINKS
T. D. Noe, Table of n, a(n) for n = 1..200
FORMULA
The general form of these numbers is d = d(m, n) = a^2 + 4mn + 1, where m and n are positive integers and a = a(m, n) = (4m^2 + 1)n + m, for which the continued fraction expansion of sqrt(d) is [a;[2m, 2m, 2a]]. - David Terr, Jul 20 2004
MATHEMATICA
cfp3Q[n_]:=Module[{s=Sqrt[n]}, If[IntegerQ[s], 1, Length[ ContinuedFraction[ s][[2]]]==3]]; Select[Range[18000], cfp3Q] (* Harvey P. Dale, May 30 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Clark Kimberling, Walter Gilbert
STATUS
approved