cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A086791 Primes found among the numerators of the continued fraction rational approximations to e.

This page as a plain text file.
%I A086791 #28 Nov 18 2019 01:37:44
%S A086791 2,3,11,19,193,49171,1084483,563501581931,332993721039856822081,
%T A086791 3883282200001578119609988529770479452142437123001916048102414513139044082579
%N A086791 Primes found among the numerators of the continued fraction rational approximations to e.
%H A086791 Joerg Arndt, <a href="/A086791/b086791.txt">Table of n, a(n) for n = 1..11</a>
%H A086791 Cino Hilliard, <a href="http://web.archive.org/web/20080411094846/http://groups.msn.com/BC2LCC/continuedfractions.msnw">Continued fractions rational approximation of numeric constants</a>.
%e A086791 The first 8 rational approximations to e are 2/1, 3/1, 8/3, 11/4, 19/7, 87/32, 106/39, 193/71. The numerators 2, 3, 11, 19, 193 are primes.
%o A086791 (PARI)
%o A086791 \\ Continued fraction rational approximation of numeric constants f. m=steps.
%o A086791 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,",")); ) }
%o A086791 (PARI)
%o A086791 default(realprecision,10^5);
%o A086791 cf=contfrac(exp(1));
%o A086791 n=0;
%o A086791 { for(k=1, #cf,  \\ generate b-file
%o A086791     pq = contfracpnqn( vector(k,j, cf[j]) );
%o A086791     p = pq[1,1];  q = pq[2,1];
%o A086791     if ( ispseudoprime(p), n+=1; print(n," ",p) );  \\ A086791
%o A086791 \\    if ( ispseudoprime(q), n+=1; print(n," ",q) );  \\ A094008
%o A086791 ); }
%o A086791 /* _Joerg Arndt_, Apr 21 2013 */
%Y A086791 Cf. A002119, A086788, A094008.
%K A086791 easy,nonn
%O A086791 1,1
%A A086791 _Cino Hilliard_, Aug 04 2003; corrected Jul 24 2004