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.

A051901 Minimal factorial safe-primes: a prime p = a(n) here if (p-1)/n! = A051888(n).

Original entry on oeis.org

3, 3, 5, 13, 73, 241, 2161, 15121, 282241, 1088641, 10886401, 199584001, 958003201, 18681062401, 1133317785601, 9153720576001, 648606486528001, 1778437140480001, 12804747411456001, 851515702861824001, 41359334139002880001, 3423093125504532480001, 46084029838881914880001
Offset: 0

Views

Author

Labos Elemer, Dec 16 1999

Keywords

Examples

			a(8) = 282241 = 8!*A051888(8) = 40320*7 + 1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{p = 2, f = n!}, While[!PrimeQ[p * f + 1], p = NextPrime[p]]; p * f + 1]; Array[a, 20, 0] (* Amiram Eldar, Feb 25 2025 *)
  • PARI
    a(n) = {my(p = 2, f = n!); while (!isprime(p * f + 1), p = nextprime(p+1)); p * f + 1; } \\ Amiram Eldar, Feb 25 2025

Formula

a(n) = 1 + n!*A051888(n) = 1 + A000142(n)*A051888(n).

Extensions

Offset changed to 0 and a(0) prepended by Amiram Eldar, Feb 25 2025