cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A187261 Least number k such that the continued fraction expansion of its square root contains the first n natural numbers.

Original entry on oeis.org

1, 2, 14, 19, 211, 463, 634, 1057, 1951, 2326, 4156, 5149, 8254, 9811, 10651, 21319, 15814, 19609, 29527, 42379, 46006, 58171, 89959, 97579, 144271, 135319, 164431, 217519, 201919, 230101, 216451, 285814, 307759, 323359
Offset: 1

Views

Author

Robert G. Wilson v, Mar 07 2011

Keywords

Examples

			a(1) is 1.
a(2) is 2 because the cf of sqrt(2) = 1, 2, 2, .., .
a(3) is 14 because the cf of sqrt(14) = 3, {1, 2, 1, 6},
a(4) is 19 because the cf of sqrt(19) = 4, {2, 1, 3, 1, 2, 8},
a(5) is 211 because the cf of sqrt(211) = 14, {1, 1, 9, 5, 1, 2, 2, 1, 1, 4, 3, 1, 13, 1, 3, 4, 1, 1, 2, 2, 1, 5, 9, 1, 1, 28} which includes the natural numbers 1 through 5 and there does not exist any integer less than 211 which has this characteristics, etc.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{cf = Union@ Flatten@ ContinuedFraction@ Sqrt@ n, k = 1}, While[k <= Length[cf] && k == cf[[k]], k++]; k - 1]; t = Table[ 0, {100}]; k = 1; While[k < 10^7, a = f@ k; If[a <= Length[t] && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++]; t
Showing 1-1 of 1 results.