OFFSET
2,1
LINKS
Lars Blomberg, Table of n, a(n) for n = 2..270
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