login
Primes p such that continued fraction of (1 + sqrt(p))/2 has period 14: primes in A146337.
3

%I #12 Mar 30 2020 08:42:12

%S 179,251,307,347,467,587,683,1987,5099,5683,7883,8059,8707,12227,

%T 14867,15083,15227,22283,34883,40627,42787,47819,50147,51683,68147,

%U 73547,78467,84523,84979,89051,95219,104947,106451,107699,132707,134291,142811,149939,164051

%N Primes p such that continued fraction of (1 + sqrt(p))/2 has period 14: primes in A146337.

%H Amiram Eldar, <a href="/A146359/b146359.txt">Table of n, a(n) for n = 1..1000</a>

%p A := proc(n) 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: isA146359 := proc(n) RETURN(isprime(n) and isA146337(n)) ; end: for k from 1 do if isA146359(ithprime(k)) then printf("%d, ",ithprime(k)) ; fi; od: # _R. J. Mathar_, Nov 08 2008

%t Select[Range[2*10^4], PrimeQ[#] && Length[ContinuedFraction[(1+Sqrt[#])/2][[2]]] == 14 &] (* _Amiram Eldar_, Mar 30 2020 *)

%Y Cf. A000290, A050950-A050969, A078370, A146326-A146345, A146348-A146360.

%K nonn

%O 1,1

%A _Artur Jasinski_, Oct 30 2008

%E 5813 and 6791 removed, extended beyond 8707 by _R. J. Mathar_, Nov 08 2008

%E More terms from _Amiram Eldar_, Mar 30 2020