A146332 Numbers k such that the continued fraction of (1 + sqrt(k))/2 has period 7.
89, 109, 113, 137, 373, 389, 509, 653, 685, 797, 853, 925, 949, 997, 1009, 1105, 1145, 1165, 1261, 1493, 1997, 2309, 2621, 2677, 2885, 2941, 3133, 3277, 3445, 3653, 3797, 4325, 4505, 4745, 4825, 4973, 5353, 5429, 5765, 6305, 6437, 6845, 7085, 7373, 7817, 7873
Offset: 1
Keywords
Examples
a(4) = 137 because continued fraction of (1+sqrt(137))/2 = 6, 2, 1, 5, 5, 1, 2, 11, 2, 1, 5, 5, 1, 2, 11, 2, 1, 5, 5, 1, 2, 11 ... has period (2, 1, 5, 5, 1, 2, 11) length 7.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Maple
A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146332 := proc(n) RETURN(A146326(n) = 7) ; end: for n from 2 to 1100 do if isA146332(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Sep 06 2009
-
Mathematica
Select[Range[10^4], !IntegerQ @ Sqrt[#] && Length[ContinuedFraction[(1 + Sqrt[#])/2][[2]]] == 7 &] (* Amiram Eldar, Mar 31 2020 *)
Extensions
997 added by R. J. Mathar, Sep 06 2009
More terms from Amiram Eldar, Mar 31 2020
Comments