OFFSET
1,1
COMMENTS
This is also the set of primes such that n^(4^(p-1)) is congruent to n or -n modulo p.
Prime p>2 is in this sequence iff (p-1)/2 belongs to A014957. - Max Alekseyev, Dec 26 2017
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000 (terms 1..204 from Philip A. Hoskins)
MAPLE
A211203:=proc(q)
local n;
for n from 1 to q do
if type((2^(2*ithprime(n)-1)-2)/(ithprime(n)-1), integer) then print(ithprime(n));
fi; od; end:
A211203(10000000); # Paolo P. Lava, Feb 18 2013
MATHEMATICA
Select[Prime[Range[1000]], Mod[1/2*(2^# + 2)*(2^# - 2), # - 1] == 0 &]
PROG
(Python)
from sympy import primerange
A211203_list = [p for p in primerange(1, 10**6) if p == 2 or p == 3 or pow(2, 2*p-1, p-1) == 2] # Chai Wah Wu, Mar 25 2021
(PARI) is(p) = lift((Mod(2, p-1)^(p-1)+1)*(Mod(2, p-1)^p-2))==0 \\ David A. Corneth, Mar 25 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Philip A. Hoskins, Feb 06 2013
STATUS
approved