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.

Showing 1-6 of 6 results.

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

A051886 a(n) is the minimal prime p such that 2^n * p + 1 is prime.

Original entry on oeis.org

2, 2, 3, 2, 7, 3, 3, 2, 3, 23, 13, 29, 3, 5, 7, 2, 37, 53, 3, 11, 7, 11, 37, 71, 73, 5, 7, 17, 13, 23, 3, 239, 43, 113, 163, 59, 3, 89, 349, 5, 97, 3, 73, 11, 67, 101, 19, 101, 61, 23, 7, 17, 7, 233, 127, 5, 541, 29, 103, 71, 31, 53, 109, 179, 163, 71, 3, 929, 31, 23, 193, 101
Offset: 0

Views

Author

Labos Elemer, Dec 15 1999

Keywords

Comments

The minimal 2^n - Germain primes in order of increasing exponent n.

Examples

			The 10th term is 13, the first term in 1024-Germain prime sequence: {13,19,37,79,223,...}. The largest prime was found for 2^79: both 1427 and 604462909807314587353088*1427 + 1 = 862568572295037916152856577 are primes.
		

Crossrefs

Programs

  • Mathematica
    Table[p = 2; While[! PrimeQ[2^n*p + 1], p = NextPrime@ p]; p, {n, 0, 71}] (* Michael De Vlieger, Mar 05 2017 *)
  • PARI
    P=10^6;
    default(primelimit,P);
    a(n)={my(N=2^n);forprime(p=2,P,if(isprime(N*p+1),return(p)));}
    vector(66,n,a(n))
    /* Joerg Arndt, Jun 18 2012 */

Formula

a(n) = (A051900(n)-1)/2^n. - Amiram Eldar, Feb 28 2025

Extensions

Better name by Joerg Arndt, Jun 18 2012

A051887 Minimal and special 2k-Germain primes, where 2k is in A002110 (primorial numbers).

Original entry on oeis.org

2, 2, 2, 2, 2, 5, 17, 11, 11, 11, 2, 23, 7, 43, 19, 3, 5, 2, 7, 3, 61, 53, 2, 41, 47, 2, 5, 7, 31, 2, 47, 13, 113, 7, 137, 103, 43, 41, 97, 3, 173, 97, 41, 13, 97, 59, 29, 53, 3, 107, 127, 197, 3, 487, 433, 31, 281, 587, 7, 89, 41, 47, 193, 239, 41, 7, 31, 67
Offset: 1

Views

Author

Labos Elemer, Dec 15 1999

Keywords

Comments

a(n) is the minimal prime p such that primorial(n)*p + 1 is also prime.
While p is in A005384, the primorial(n)*p + 1 primes are in A051902 (primorial-safe primes).
Analogous to or subset of A051686, where the even numbers are 2, 6, ..., A002110(n), ...

Examples

			a(25) = 47 because primorial(25)*47 + 1 is also prime and minimal with this property: primorial(25)*47 + 1 = 47*2305567963945518424753102147331756070 + 1 = 108361694305439365963395800924592535291 is a minimal prime. The first 6 terms (2,2,2,2,2,5) correspond to first entries in A005384, A007693, A051645, A051647, A051653, A051654, respectively.
		

Crossrefs

Programs

  • Mathematica
    Table[p = 2; While[! PrimeQ[Product[Prime@ i, {i, n}] p + 1], p = NextPrime@ p]; p, {n, 68}] (* Michael De Vlieger, Jun 29 2017 *)
  • PARI
    a(n) = {my(p = 2, r = vecprod(primes(n))); while(!isprime(p * r + 1), p = nextprime(p+1)); p;} \\ Amiram Eldar, Feb 25 2025

Formula

a(n) = (A051902(n)-1)/A002110(n). - Amiram Eldar, Feb 25 2025

Extensions

More terms from Michael De Vlieger, Jun 29 2017

A064983 a(n) is the smallest prime p such that p*n! - 1 is prime.

Original entry on oeis.org

3, 3, 2, 2, 2, 2, 2, 2, 5, 3, 29, 11, 3, 5, 2, 2, 53, 2, 67, 79, 5, 61, 2, 7, 13, 5, 3, 11, 2, 107, 43, 7, 31, 199, 293, 17, 43, 197, 109, 41, 13, 277, 11, 167, 17, 83, 157, 31, 199, 131, 13, 5, 89, 47, 223, 83, 43, 7, 139, 151, 211, 19, 19, 23, 43, 311, 61, 53, 191, 163, 11
Offset: 0

Views

Author

Robert G. Wilson v, Oct 30 2001

Keywords

Comments

The PFGW program has been used to certify all the primes corresponding to the terms up to a(1000), using a deterministic test which exploits the factorization of a(n) + 1. - Giovanni Resta, May 30 2018

Crossrefs

Cf. A051888.

Programs

  • Mathematica
    Do[k = 1; While[ !PrimeQ[ Prime[k]*n! - 1], k++ ]; Print[ Prime[k]], {n, 1, 75} ]
  • PARI
    { allocatemem(932245000); for (n=0, 200, f=n!; k=1; while(!isprime(prime(k)*f - 1), k++); write("b064983.txt", n, " ", prime(k)) ) } \\ Harry J. Smith, Oct 02 2009

A051902 Minimal primorial safe primes: p and primorial*p + 1 are both primes.

Original entry on oeis.org

5, 13, 61, 421, 4621, 150151, 8678671, 106696591, 2454021571, 71166625531, 401120980261, 170676977100631, 2129751844690471, 562558737261811291, 11682905869181336791, 97767475431570134191, 9613801750771063195351, 234576762718813941966541, 55008250857561869391153631
Offset: 1

Views

Author

Labos Elemer, Dec 16 1999

Keywords

Comments

In A051888, 13 of the first 25 values are distinct, while here all corresponding min-primorial-safe-primes are different: {2,5,17,11,23,43,19,3,7,61,53,41,47}.

Examples

			The first five terms of A051887 are 2, so the first 5 terms have the form 1 + 2*A002110(n): 5, 13, 61, 421, 4621, which are smallest terms in A005385, A051644, A051646, A051648, A051649. The 6th term here is A051651(1) = A051887(6)*A002110(6) + 1 = 5*30030 + 1.
		

Crossrefs

Programs

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

Formula

a(n) = 1 + A002110(n)*A051887(n).

A064998 a(n) is the smallest prime p such that p*n! +- 1 are twin primes.

Original entry on oeis.org

2, 2, 3, 2, 17, 7, 7, 3, 61, 29, 167, 401, 167, 19, 311, 461, 97, 919, 47, 71, 1483, 107, 13, 1571, 821, 1361, 769, 239, 163, 4229, 593, 373, 1571, 173, 6229, 3331, 1879, 2837, 2633, 12329, 2311, 269, 4159, 1217, 9719, 509, 3049, 8429, 307, 6121, 7919
Offset: 2

Views

Author

Robert G. Wilson v, Oct 31 2001

Keywords

Examples

			a(6) = 17 because 17*6! = 12240, 12240 + 1 and 12240 - 1 are twin primes, and there is no prime less than 17 for which this pairing will work.
		

Crossrefs

Programs

  • Mathematica
    Do[k = 1; While[ !PrimeQ[ Prime[k]*n! - 1] || !PrimeQ[ Prime[k]*n! + 1], k++ ]; Print[ Prime[k]], {n, 2, 75} ]
  • PARI
    { allocatemem(932245000); for (n=2, 200, f=n!; p=2; while (!isprime(p*f + 1) || !isprime(p*f - 1), p=nextprime(p + 1)); write("b064998.txt", n, " ", p) ) } \\ Harry J. Smith, Oct 03 2009
Showing 1-6 of 6 results.