OFFSET
1,1
COMMENTS
Numbers k such that prime(k+1) - prime(k) does not divide prime(k+1) + prime(k). These are the numbers k for which prime(k+1) - prime(k) > 2. - Thomas Ordowski, Mar 31 2022
EXAMPLE
prime(4)=7, 6!+1=721 gives residue 1 if divided by prime(4)+2=9.
MATHEMATICA
pnmQ[n_]:=Module[{p=Prime[n]}, Mod[(p-1)!+1, p+2]==1]; Select[Range[ 100], pnmQ] (* Harvey P. Dale, Jun 24 2017 *)
PROG
(PARI) isok(n) = (((prime(n)-1)! + 1) % (prime(n)+2)) == 1; \\ Michel Marcus, Dec 31 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Definition edited by Thomas Ordowski, Mar 31 2022
STATUS
approved