A146348 Primes p such that continued fraction of (1 + sqrt(p))/2 has period 3.
17, 37, 61, 101, 197, 257, 317, 401, 461, 557, 577, 677, 773, 1129, 1297, 1429, 1601, 1877, 1901, 2917, 3137, 4357, 4597, 5417, 5477, 6053, 7057, 8101, 8761, 8837, 10733, 11621, 12101, 13457, 13877, 14401, 15277, 15377, 15877, 16333, 16901, 17737, 17957, 18329, 21317, 22501, 23593, 24337, 25601, 28901, 30137, 30977, 32401, 33857, 41453, 41617, 42437, 44101
Offset: 1
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..2500 (terms 1..200 from Zak Seidov)
Programs
-
Maple
A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146348 := proc(n) RETURN(isprime(n) and A146326(n) = 3) ; end: for n from 2 to 4000 do if isA146348(n) then printf("%d,\n",n) ; fi; od: # R. J. Mathar, Sep 06 2009
-
Mathematica
okQ[n_] := Length[ContinuedFraction[(1 + Sqrt[n])/2][[2]]] == 3; Select[Prime[Range[100]], okQ]
Extensions
1019 removed; more terms added by R. J. Mathar, Sep 06 2009
More terms from Zak Seidov, Mar 09 2011
Comments