login
A206584
The least number s having exactly n fours in the continued fraction of sqrt(s).
4
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,1
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 *)
CROSSREFS
Cf. A206578 (n ones), A206582 (n twos), A206583 (n threes), A206585 (n fives).
Sequence in context: A376043 A005114 A216079 * A268286 A081090 A330282
KEYWORD
nonn
AUTHOR
T. D. Noe, Mar 19 2012
STATUS
approved