login
A138111
Prime numbers p1 such that p1*p2 - (p2 mod p1) is a prime, where p2 is the next prime after p1.
5
2, 3, 7, 19, 23, 43, 53, 79, 127, 211, 229, 233, 337, 397, 443, 463, 467, 499, 503, 601, 631, 661, 967, 991, 1009, 1129, 1153, 1213, 1237, 1279, 1297, 1381, 1399, 1423, 1447, 1453, 1471, 1511, 1597, 1621, 1699, 1723, 1783, 1831, 1879, 1993, 2029, 2297, 2437, 2543, 2647
OFFSET
1,1
LINKS
EXAMPLE
2 is prime, 3 is next prime, 2*3 - (3 mod 2) = 2*3 - 1 = 5 is prime.
3 is prime, 5 is next prime, 3*5 - (5 mod 3) = 3*5 - 2 = 13 is prime.
7 is prime, 11 is next prime, 7*11 - (11 mod 7) = 7*11 - 4 = 73 is prime.
MATHEMATICA
a={}; Do[p1=Prime[n]; p2=Prime[n+1]; e=p1*p2-Mod[p2, p1]; If[PrimeQ[e], AppendTo[a, p1]], {n, 10^2*2}]; a
PROG
(PARI) ok(p)={my(q=nextprime(p+1)); isprime(p) && isprime(p*q - (q%p))}
select(ok, primes(1000)) \\ Andrew Howroyd, Jan 12 2020
CROSSREFS
Sequence in context: A117763 A165571 A178954 * A218100 A349622 A078373
KEYWORD
nonn
AUTHOR
EXTENSIONS
Terms a(29) and beyond from Andrew Howroyd, Jan 12 2020
STATUS
approved