OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..144
Chris Caldwell, Mersenne Primes: History, Theorems and Lists.
FORMULA
A Mersenne number (A001348) is a number of the form 2^p - 1 where p is prime.
EXAMPLE
The 10th Mersenne number 2^29 - 1 = 233*1103*2089 and 2089 is the third prime factor. Notice these factors are congruent to 1 (mod 29).
PROG
(PARI) mersenne2(n) = { c=0; forprime(x=2, n, c++; y = 2^x-1; f=ifactor(y); if(length(f)>=3, print1(f[3]", "); ) ) }
ifactor(n) = { local(f, j, k, flist); flist=[]; f=Vec(factor(n)); for(j=1, length(f[1]), for(k = 1, f[2][j], flist = concat(flist, f[1][j]) ); ); return(flist) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Dec 06 2003, corrected Nov 16 2006
EXTENSIONS
a(16) from Amiram Eldar, Jul 11 2024
STATUS
approved