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.

Showing 1-2 of 2 results.

A094008 Primes which are the denominators of convergents of the continued fraction expansion of e.

Original entry on oeis.org

3, 7, 71, 18089, 10391023, 781379079653017, 2111421691000680031, 1430286763442005122380663256416207
Offset: 1

Views

Author

Jonathan Sondow, Apr 20 2004

Keywords

Comments

The position of a(n) in A000040 (the prime numbers) is A102049(n) = A000720(a(n)). - Jonathan Sondow, Dec 27 2004
The next term has 166 digits. [Harvey P. Dale, Aug 23 2011]

Examples

			a(1) = 3 because 3 is the first prime denominator of a convergent, 8/3, of the simple continued fraction for e
		

Crossrefs

Programs

  • Mathematica
    Block[{$MaxExtraPrecision=1000},Select[Denominator[Convergents[E,500]], PrimeQ]] (* Harvey P. Dale, Aug 23 2011 *)
  • PARI
    default(realprecision,10^5);
    cf=contfrac(exp(1));
    n=0;
    { for(k=1, #cf,  \\ generate b-file
        pq = contfracpnqn( vector(k,j, cf[j]) );
        p = pq[1,1];  q = pq[2,1];
    \\    if ( ispseudoprime(p), n+=1; print(n," ",p) );  \\ A086791
        if ( ispseudoprime(q), n+=1; print(n," ",q) );  \\ A094008
    ); }
    /* Joerg Arndt, Apr 21 2013 */

Formula

a(n) = A007677(A094007(n)) = A000040(A102049(n)).

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

Original entry on oeis.org

7, 113, 265381, 842468587426513207
Offset: 1

Views

Author

Cino Hilliard, Aug 04 2003; corrected Jul 30 2004

Keywords

Comments

The next term is too large to include.

Examples

			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.
		

Crossrefs

Programs

  • PARI
    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,",")); ) }
    
  • PARI
    default(realprecision,10^5);
    cf=contfrac(Pi);
    n=0;
    { for(k=1, #cf,  \\ generate b-file
        pq = contfracpnqn( vector(k,j, cf[j]) );
        p = pq[1,1];  q = pq[2,1];
    \\    if ( ispseudoprime(p), n+=1; print(n," ",p) );  \\ A086785
        if ( ispseudoprime(q), n+=1; print(n," ",q) );  \\ A086788
    ); }
    /* Joerg Arndt, Apr 21 2013 */

Extensions

Offset corrected by Joerg Arndt, Apr 21 2013
Showing 1-2 of 2 results.