A146478 a(n) = length of period of continued fraction (1 + sqrt(prime(n)))/2.
2, 2, 1, 4, 2, 1, 3, 6, 4, 1, 8, 3, 5, 10, 4, 1, 6, 3, 10, 8, 9, 4, 2, 7, 9, 3, 12, 6, 7, 7, 12, 6, 7, 18, 5, 20, 5, 18, 4, 1, 14, 5, 16, 15, 3, 20, 26, 4, 2, 1, 9, 12, 19, 14, 3, 12, 5, 24, 9, 15, 18, 1, 14, 16, 19, 3, 34, 21, 14, 9, 9, 4, 20, 7, 30, 8, 7, 5, 3, 27, 18, 13, 16, 23, 4, 2, 19, 23, 3
Offset: 1
Keywords
Links
- Zak Seidov, Table of n, a(n) for n = 1..1000
Programs
-
Maple
A146478 := proc(p) local c; c := numtheory[cfrac](1/2+sqrt(p)/2,'periodic','quotients') ; nops(c[2]) ; end: for n from 1 to 100 do printf("%d,",A146478(ithprime(n))) ; od: # R. J. Mathar, Nov 05 2008
-
Mathematica
Table[Length[ContinuedFraction[(1+Sqrt[Prime[n]])/2][[2]]],{n,100}] (* Zak Seidov, Mar 22 2011 *)
Extensions
a(59) changed from 7 to 9 by R. J. Mathar, Nov 05 2008
Comments