A146337 Numbers k such that continued fraction of (1 + sqrt(k))/2 has period 14.
118, 154, 179, 201, 212, 244, 251, 262, 286, 292, 307, 340, 347, 388, 403, 418, 422, 430, 467, 471, 474, 494, 497, 500, 519, 543, 548, 566, 587, 594, 598, 670, 683, 687, 692, 698, 699, 703, 713, 722, 742, 745, 754, 831, 833, 847, 873, 879, 932, 939, 945
Offset: 1
Keywords
Examples
a(1) = 421 because continued fraction of (1+sqrt(421))/2 = 17, 5, 3, 1, 1, 1, 2, 26, 2, 1, 1, 1, 3, 5, 13, 5, 3, 1, 1, 1, 2, 26, 2, 1, 1, 1, 3, 5, 13, 5, 3, 1, 1, 1, 2, 26... has period (5, 3, 1, 1, 1, 2, 26, 2, 1, 1, 1, 3, 5, 13) length 14.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Maple
A := proc(n) option remember ; local c; try c := numtheory[cfrac](1/2+sqrt(n)/2,'periodic','quotients') ; RETURN(nops(c[2]) ); catch: RETURN(-1) end try ; end: isA146337 := proc(n) if A(n) = 14 then RETURN(true); else RETURN(false); fi; end: for k from 1 do if isA146337(k) then printf("%d, ",k) ; fi; od: # R. J. Mathar, Nov 08 2008
-
Mathematica
cf14Q[n_]:=Module[{s=(1+Sqrt[n])/2},!IntegerQ[s]&&Length[ ContinuedFraction[ s][[2]]] == 14]; Select[Range[1000],cf14Q] (* Harvey P. Dale, Oct 15 2015 *)
Extensions
More terms from R. J. Mathar, Nov 08 2008
Comments