cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A049579 Numbers k such that prime(k)+2 divides (prime(k)-1)!.

Original entry on oeis.org

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

Views

Author

Keywords

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
If we prepend 1, the first differences are A251092 (see also A175632). The complement is A029707. - Gus Wiseman, Dec 03 2024

Examples

			prime(4) = 7, 6!+1 = 721 gives residue 1 when divided by prime(4)+2 = 9.
		

Crossrefs

The first differences are A251092 except first term, run-lengths A373819.
The complement is A029707.
Runs of terms differing by one have lengths A027833, min A107770, max A155752.
A000040 lists the primes, differences A001223 (run-lengths A333254, A373821).
A038664 finds the first prime gap of difference 2n.
A046933 counts composite numbers between primes.
A071148 gives partial sums of odd primes.

Programs

  • Mathematica
    pnmQ[n_]:=Module[{p=Prime[n]},Mod[(p-1)!+1,p+2]==1]; Select[Range[ 100],pnmQ] (* Harvey P. Dale, Jun 24 2017 *)
  • PARI
    isok(n) = (((prime(n)-1)! + 1) % (prime(n)+2)) == 1; \\ Michel Marcus, Dec 31 2013

Extensions

Definition edited by Thomas Ordowski, Mar 31 2022