login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
3
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,1
LINKS
EXAMPLE
For n=9, 2^n-1 = 511 with iterates 511->591->791->911, and 911 is the first prime, so a(7)=911.
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 31 2017
EXTENSIONS
Added a(7) and a(13)-a(33) from Lars Blomberg, Sep 01 2017
STATUS
approved