login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257002 Primes p such that p+2 divides p^p+2. 1
7, 13, 19, 31, 37, 61, 67, 109, 127, 139, 157, 181, 193, 199, 211, 307, 313, 337, 379, 397, 409, 487, 499, 541, 571, 577, 631, 691, 751, 769, 787, 811, 829, 877, 919, 937, 991, 1009, 1021, 1039, 1117, 1201, 1291, 1297, 1327, 1381, 1399, 1459, 1471, 1531, 1567 (list; graph; refs; listen; history; text; internal format)
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

Cf. A000040, A091180, A213382.

Sequence in context: A106870 A040038 A081765 * A216567 A091180 A272381

Adjacent sequences:  A256999 A257000 A257001 * A257003 A257004 A257005

KEYWORD

nonn

AUTHOR

K. D. Bajpai, Apr 14 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 12 14:35 EST 2019. Contains 329058 sequences. (Running on oeis4.)