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.

A291776 a(n) = prime that is eventually reached when x -> sigma(x)-1 is repeatedly applied to 2^n-1, or -1 if no prime is ever reached.

Original entry on oeis.org

3, 7, 23, 31, 103, 127, 431, 911, 1847, 6719, 10487, 8191, 56999, 41399, 135647, 131071, 560159, 524287, 1999871, 3982271, 5909759, 17512991, 46092239, 46335599, 164460119, 186592247, 736727807, 3926707199, 4146049487, 2147483647, 8994904463, 11132323439
Offset: 2

Views

Author

N. J. A. Sloane, Aug 31 2017

Keywords

Examples

			For n=9, 2^n-1 = 511 with iterates 511->591->791->911, and 911 is the first prime, so a(7)=911.
		

Crossrefs

Programs

  • PARI
    P(x) = {for(c=0,10^6,if(isprime(x),return(x),x=sigma(x)-1));-1}
    vector(200,n,P(2^(n+1)-1)) \\ Lars Blomberg, Sep 01 2017

Extensions

Added a(7) and a(13)-a(33) from Lars Blomberg, Sep 01 2017