login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A049579
Numbers k such that prime(k)+2 divides (prime(k)-1)!.
3
4, 6, 8, 9, 11, 12, 14, 15, 16, 18, 19, 21, 22, 23, 24, 25, 27, 29, 30, 31, 32, 34, 36, 37, 38, 39, 40, 42, 44, 46, 47, 48, 50, 51, 53, 54, 55, 56, 58, 59, 61, 62, 63, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95
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
Sequence in context: A211302 A123938 A121150 * A137242 A098015 A180638
KEYWORD
nonn
AUTHOR
EXTENSIONS
Definition edited by Thomas Ordowski, Mar 31 2022
STATUS
approved