OFFSET
1,5
COMMENTS
When k=1 the prime k*2^prime(n)-1 is a Mersenne prime.
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..3000
FORMULA
a(n) = A126717(prime(n)). - Michel Marcus, Sep 07 2016
EXAMPLE
1*2^7-1 = 127 prime so a(4) = 1 as prime(4)=7.
1*2^11-1 = 2047 composite, 3*2^11-1 = 6143 prime so a(5) = 3 as prime(5)=11.
MATHEMATICA
Table[k = 1; While[! PrimeQ[k 2^Prime@ n - 1], k += 2]; k, {n, 63}] (* Michael De Vlieger, Aug 21 2016 *)
PROG
(PARI) a(n) = {my(k=1); while (!isprime(k*2^prime(n)-1), k+=2); k; } \\ Michel Marcus, Aug 21 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Aug 21 2016
STATUS
approved