A121339 Periodic part of continued fraction for square roots of integers.
2, 1, 2, 4, 2, 4, 1, 1, 1, 4, 1, 4, 6, 3, 6, 2, 6, 1, 1, 1, 1, 6, 1, 2, 1, 6, 1, 6, 8, 4, 8, 2, 1, 3, 1, 2, 8, 2, 8, 1, 1, 2, 1, 1, 8, 1, 2, 4, 2, 1, 8, 1, 3, 1, 8, 1, 8, 10, 5, 10, 3, 2, 3, 10, 2, 1, 1, 2, 10, 2, 10, 1, 1, 3, 5, 3, 1, 1, 10, 1, 1, 1, 10, 1, 2, 1, 10, 1, 4, 1, 10, 1, 10, 12, 6, 12, 4, 12
Offset: 2
Examples
The table starts: 2 1 2 <empty> 4 2 4 1 1 1 4 1 4
Links
- T. D. Noe, Rows n = 2..1000 of triangle, flattened
Programs
-
Mathematica
a[n_] := If[ IntegerQ[ Sqrt[n] ], {}, ContinuedFraction[ Sqrt[n] ] // Last]; Table[a[n], {n, 2, 39}] // Flatten (* Jean-François Alcover, Sep 10 2012 *)