OFFSET
1,1
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
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
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 06 2008
EXTENSIONS
Terms a(29) and beyond from Andrew Howroyd, Jan 12 2020
STATUS
approved