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).

This page as a plain text file.
%I A051901 #18 Feb 25 2025 04:04:27
%S A051901 3,3,5,13,73,241,2161,15121,282241,1088641,10886401,199584001,
%T A051901 958003201,18681062401,1133317785601,9153720576001,648606486528001,
%U A051901 1778437140480001,12804747411456001,851515702861824001,41359334139002880001,3423093125504532480001,46084029838881914880001
%N A051901 Minimal factorial safe-primes: a prime p = a(n) here if (p-1)/n! = A051888(n).
%H A051901 Amiram Eldar, <a href="/A051901/b051901.txt">Table of n, a(n) for n = 0..448</a>
%F A051901 a(n) = 1 + n!*A051888(n) = 1 + A000142(n)*A051888(n).
%e A051901 a(8) = 282241 = 8!*A051888(8) = 40320*7 + 1.
%t A051901 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 *)
%o A051901 (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
%Y A051901 Cf. A005385, A051888, A000142.
%K A051901 nonn
%O A051901 0,1
%A A051901 _Labos Elemer_, Dec 16 1999
%E A051901 Offset changed to 0 and a(0) prepended by _Amiram Eldar_, Feb 25 2025