OFFSET
1,2
COMMENTS
Mp is prime iff 3^(2^(p(n)-1)+1) is congruent to (-9) Mod Mp. Thus M7 = 127 is prime because 3^65 Mod 127 = 118 (=127-9) while M11 = 2047 is composite because 3^1025 Mod 2047 <> 2038.
LINKS
Dennis Martin, Table of n, a(n) for n = 1..100
FORMULA
a(n) = 3^(2^(p(n)-1)+1) Mod 2^p(n)-1
EXAMPLE
a(5) = 3^(2^(11-1)+1) Mod 2^11-1 = 3^1025 Mod 2047 = 1803
CROSSREFS
KEYWORD
nonn
AUTHOR
Dennis Martin (dennis.martin(AT)dptechnology.com), Jul 13 2007, Jul 20 2007
STATUS
approved