OFFSET
1,1
COMMENTS
Prime numbers p1 such that p1*p2+p2-p1 is a prime, where p2 is the next prime after p1. - J. M. Bergot and Robert Israel, Dec 30 2021
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
2 is prime, 3 is next prime, 2*3 + (3 mod 2) = 6 + 1 = 7;
3 is prime, 5 is next prime, 3*5 + (5 mod 3) = 15 + 2 = 17;
5 is prime, 7 is next prime, 5*7 + (7 mod 5) = 35 + 2 = 37.
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
pnQ[n_]:=Module[{np=NextPrime[n]}, PrimeQ[n*np+Mod[np, n]]]; Select[Prime[ Range[200]], pnQ] (* Harvey P. Dale, Mar 09 2014 *)
Select[Partition[Prime[Range[200]], 2, 1], PrimeQ[Times@@#+Mod[#[[2]], #[[1]]]]&][[;; , 1]] (* Harvey P. Dale, Apr 06 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 06 2008
STATUS
approved