A086395 Primes found among the numerators of the continued fraction rational approximations to sqrt(2).
3, 7, 17, 41, 239, 577, 665857, 9369319, 63018038201, 489133282872437279, 19175002942688032928599, 123426017006182806728593424683999798008235734137469123231828679
Offset: 1
Keywords
References
- Prime Obsession, John Derbyshire, Joseph Henry Press, April 2004, p 16.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..18
Programs
-
Mathematica
Select[Numerator[Convergents[Sqrt[2],250]],PrimeQ] (* Harvey P. Dale, Oct 19 2011 *)
-
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,",")); ) }
-
PARI
primenum(n,k,typ) = \yp = 1 num, 2 denom. print only prime num or denom. { local(a,b,x,tmp,v); a=1;b=1; for(x=1,n, tmp=b; b=a+b; a=k*tmp+a; if(typ==1,v=a,v=b); if(isprime(v),print1(v","); ) ); print(); print(a/b+.) }
Formula
Extensions
Edited by N. J. A. Sloane, Aug 23 2008 at the suggestion of R. J. Mathar
Comments