OFFSET
1,1
COMMENTS
These are the prime values of n such that 2^n == 2 (mod n*(n-1)). - V. Raman, Sep 17 2012
These are the prime values p such that n^(2^(p-1)) is congruent to n or -n (mod p) for all n in Z/pZ, the commutative ring associated with each term. This results follows from Fermat's little theorem. - Philip A. Hoskins, Feb 08 2013
A prime p is in this sequence iff p-1 belongs to A014741. For p>2, this is equivalent to (p-1)/2 belonging to A014945. - Max Alekseyev, Aug 31 2016
From Thomas Ordowski, Nov 20 2018: (Start)
Conjecture: if n-1 divides 2^n-2, then (2^n-2)/(n-1) is squarefree.
Numbers n such that b^n == b (mod (n-1)*n) for every integer b are 2, 3, 7, and 43; i.e., only prime numbers of the form A014117(k) + 1. (End)
These are primes p such that p^2 divides b^(2^p-2) - 1 for every b coprime to p. - Thomas Ordowski, Jul 01 2024
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..3314 (First 553 terms from V. Raman)
Mersenne Forum, Prime Conjecture
MATHEMATICA
Select[Prime[Range[10000]], Mod[2^# - 2, # - 1] == 0 &] (* T. D. Noe, Sep 19 2012 *)
Join[{2, 3}, Select[Prime[Range[30000]], PowerMod[2, #, #-1]==2&]] (* Harvey P. Dale, Apr 17 2022 *)
PROG
(PARI) isA069051(p)=Mod(2, p-1)^p==2 && isprime(p); \\ Charles R Greathouse IV, Sep 19 2012
(Magma) [p : p in PrimesUpTo(310000) | IsZero((2^p-2) mod (p-1))]; // Vincenzo Librandi, Dec 03 2018
(GAP) Filtered([1..350000], p->IsPrime(p) and (2^p-2) mod (p-1)=0); # Muniru A Asiru, Dec 03 2018
(Python)
from sympy import prime
for n in range(1, 350000):
if (2**prime(n)-2) % (prime(n)-1)==0:
print(prime(n)) # Stefano Spezia, Dec 07 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 03 2002
EXTENSIONS
a(1) added by Charles R Greathouse IV, Sep 19 2012
STATUS
approved