A054269 Length of period of continued fraction for sqrt(prime(n)).
1, 2, 1, 4, 2, 5, 1, 6, 4, 5, 8, 1, 3, 10, 4, 5, 6, 11, 10, 8, 7, 4, 2, 5, 11, 1, 12, 6, 15, 9, 12, 6, 9, 18, 9, 20, 17, 18, 4, 5, 14, 21, 16, 13, 1, 20, 26, 4, 2, 5, 11, 12, 17, 14, 1, 12, 3, 24, 21, 13, 18, 5, 14, 16, 17, 11, 34, 19, 14, 7, 15, 4, 20, 5, 30, 8, 9, 21, 1, 21, 18, 37, 16
Offset: 1
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
- A. I. Gliga, On continued fractions of the square root of prime numbers
Programs
-
Maple
with(numtheory): for i from 1 to 150 do cfr := cfrac(ithprime(i)^(1/2), 'periodic','quotients'); printf(`%d,`, nops(cfr[2])) od:
-
Mathematica
Table[p=Prime[n]; Length[Last[ContinuedFraction[Sqrt[p]]]],{n,100}] (* T. D. Noe, May 22 2007 *) Length[ContinuedFraction[Sqrt[#]][[2]]]&/@Prime[Range[100]] (* Harvey P. Dale, Sep 28 2024 *)
Extensions
More terms from James Sellers, May 05 2000
Comments