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.

A086788 Primes found among the denominators of the continued fraction rational approximations to Pi.

This page as a plain text file.
%I A086788 #33 Nov 23 2019 04:45:10
%S A086788 7,113,265381,842468587426513207
%N A086788 Primes found among the denominators of the continued fraction rational approximations to Pi.
%C A086788 The next term is too large to include.
%H A086788 Joerg Arndt, <a href="/A086788/b086788.txt">Table of n, a(n) for n = 1..10</a>
%H A086788 Cino Hilliard, <a href="http://groups.msn.com/BC2LCC/continuedfractions.msnw">Continued fractions rational approximation of numeric constants</a>. [needs login]
%e A086788 The first 5 rational approximations to Pi are 3/1, 22/7, 333/106, 355/113, 103993/33102; of these, the prime denominators are 7 and 113.
%o A086788 (PARI)
%o A086788 cfracdenomprime(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(denom),print1(denom,",")); ) }
%o A086788 (PARI)
%o A086788 default(realprecision,10^5);
%o A086788 cf=contfrac(Pi);
%o A086788 n=0;
%o A086788 { for(k=1, #cf,  \\ generate b-file
%o A086788     pq = contfracpnqn( vector(k,j, cf[j]) );
%o A086788     p = pq[1,1];  q = pq[2,1];
%o A086788 \\    if ( ispseudoprime(p), n+=1; print(n," ",p) );  \\ A086785
%o A086788     if ( ispseudoprime(q), n+=1; print(n," ",q) );  \\ A086788
%o A086788 ); }
%o A086788 /* _Joerg Arndt_, Apr 21 2013 */
%Y A086788 Cf. A086791, A086785.
%K A086788 easy,nonn
%O A086788 1,1
%A A086788 _Cino Hilliard_, Aug 04 2003; corrected Jul 30 2004
%E A086788 Offset corrected by _Joerg Arndt_, Apr 21 2013