OFFSET
2,8
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)=3.
PROG
(PARI) C(x) = {for(c=0, 10^5, if(isprime(x), return(c), x=sigma(x)-1)); -1}
vector(200, n, C(2^(n+1)-1)) \\ Lars Blomberg, Sep 01 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 31 2017
EXTENSIONS
a(13)-a(82) from Lars Blomberg, Sep 01 2017
STATUS
approved