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.

A206584 The least number s having exactly n fours in the continued fraction of sqrt(s).

Original entry on oeis.org

2, 5, 52, 329, 379, 639, 631, 3937, 1471, 2461, 2524, 6931, 3259, 11809, 5659, 16756, 8779, 14749, 10399, 24721, 14452, 25429, 16669, 31021, 16879, 45301, 21061, 45109, 31054, 72721, 28414, 81061, 40189, 86041, 34654, 109909, 44371, 74881, 42046, 79501, 53551
Offset: 0

Views

Author

T. D. Noe, Mar 19 2012

Keywords

Crossrefs

Cf. A206578 (n ones), A206582 (n twos), A206583 (n threes), A206585 (n fives).

Programs

  • Mathematica
    nn = 50; zeros = nn; t = Table[0, {nn}]; k = 2; While[zeros > 0, If[! IntegerQ[Sqrt[k]], cnt = Count[ContinuedFraction[Sqrt[k]][[2]], 4]; If[cnt <= nn && t[[cnt]] == 0, t[[cnt]] = k; zeros--]]; k++]; Join[{2}, t]
    With[{tbl=Table[{n,Count[If[IntegerQ[Sqrt[n]],{1},ContinuedFraction[Sqrt[n]][[2]]],4]},{n,2,110000}]},Table[SelectFirst[tbl,#[[2]]==k&],{k,0,40}]][[All,1]] (* Harvey P. Dale, Oct 05 2022 *)