OFFSET
1,1
COMMENTS
All the terms in this sequence are congruent to 1 mod 3.
Primes p such that 2^p == 2 (mod p+2). Includes A091180. - Robert Israel, Apr 14 2015
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..5700
EXAMPLE
a(1) = 7 is prime; 7+2 = 9 divides 7^7 + 2 = 823545.
a(2) = 13 is prime; 13+2 = 15 divides 13^13 + 2 = 302875106592255.
MAPLE
select(t -> isprime(t) and (2 &^t - 2) mod (t+2) = 0, [seq(6*i+1, i=1..10^4)]); # Robert Israel, Apr 14 2015
MATHEMATICA
Select[Prime[Range[3000]], Mod[#^# + 2, # + 2] == 0 &]
Select[Prime[Range[500]], PowerMod[#, #, #+2]==#&] (* Harvey P. Dale, May 19 2017 *)
PROG
(PARI) forprime(p=2, 1000, if(Mod(p^p+2, p+2)==0, print1(p, ", ")));
(Python)
from sympy import prime
A257002_list = [p for p in (prime(n) for n in range(1, 10**4)) if pow(p, p, p+2) == p] # Chai Wah Wu, Apr 14 2015
(Magma) [ p: p in PrimesUpTo(1600) | (p^p+2) mod (p+2) eq 0 ]; // Vincenzo Librandi, Apr 15 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Apr 14 2015
STATUS
approved