OFFSET
1,1
COMMENTS
For primes in this sequence see A146348.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 3 because continued fraction of (1+sqrt(17))/2 = 2, 1, 1, 3, 1, 1, 3, ... has period (1,1,3) length 3.
MAPLE
A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic', 'quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146328 := proc(n) RETURN(A146326(n) = 3) ; end: for n from 2 to 1801 do if isA146328(n) then printf("%d, ", n) ; fi; od: # R. J. Mathar, Sep 06 2009
MATHEMATICA
okQ[n_] := Module[{cf = ContinuedFraction[(1 + Sqrt[n])/2]}, Length[cf] > 1 && Length[cf[[2]]] == 3]; Select[Range[5000], okQ]
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Oct 30 2008
EXTENSIONS
803 removed by R. J. Mathar, Sep 06 2009
Extended by T. D. Noe, Mar 09 2011
STATUS
approved