A096146 Prime numerators of the rational convergents to sqrt(3).
2, 5, 7, 19, 71, 97, 3691, 191861, 138907099, 708158977, 26947261171
Offset: 1
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..18
Programs
-
Mathematica
Select[Numerator[Convergents[Sqrt[3],200]],PrimeQ] (* Harvey P. Dale, Nov 08 2022 *)
-
PARI
\\ Continued fraction rational approximation of numeric constants f. m=steps. cfracnumprime(m,f) = { default(realprecision,3000); cf = vector(m+10); x=f; for(n=0,m, i=floor(x); x=1/(x-i); cf[n+1] = i; ); for(m1=0,m, r=cf[m1+1]; forstep(n=m1,1,-1, r = 1/r; r+=cf[n]; ); numer=numerator(r); denom=denominator(r); if(ispseudoprime(numer),print1(numer,", ")); ) }
Extensions
Offset corrected by Amiram Eldar, Jul 11 2024
Comments