OFFSET
1,1
COMMENTS
All terms == 2 (mod 3). Also most are congruent to 1 (mod 10). Those that are not: 2, 5, 17, 257, 3089, 49409, 54449, 65537, 83969, 149057, .... - Robert G. Wilson v, Dec 02 2013
Number of terms < 10^k: 2, 4, 9, 17, 49, 105, 244, 574, 1388, .... - Robert G. Wilson v, Dec 02 2013
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1637
MATHEMATICA
Select[ Prime@ Range@ 6000, PowerMod[3, # - 1, # (# - 1)] == 1 &] (* Robert G. Wilson v, Dec 02 2013 *)
PROG
(PARI) lista(nn) = forprime(p=2, nn, if (! ((3^(p-1)-1) % (p*(p-1))), print1(p, ", "))) \\ Michel Marcus, Dec 02 2013
(PARI) is(n)=isprime(n) && Mod(3, n^2-n)^(n-1)==1 \\ Charles R Greathouse IV, Dec 02 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 09 2003
EXTENSIONS
Missing term 2 added to sequence by Robert G. Wilson v, Dec 02 2013
STATUS
approved