Problems & Puzzles: Puzzles

Puzzle 1128 Prime(n)!-Prime(n!)

After I received the contribution from Michael Branicky for Puzzle 1127, I proposed him to look for primes of the expression:


Very soon his answers came out:

Prime(n)!-Prime(n!), it is prime for n = 2, 3, 4, 5, 7:
Prime(2)! - Prime(2!) = 3 is prime
Prime(3)! - Prime(3!) = 107 is prime
Prime(4)! - Prime(4!) = 4951 is prime
Prime(5)! - Prime(5!) = 39916141 is prime
Prime(7)! - Prime(7!) = 355687428046967 is prime

There are no other prime terms for n = 1..21.

See his OEIS sequence A362056

Q. Are there more primes of this form?

On April, 14, 2023, Oscar Volpatti wrote:

I computed next term a(22) = Prime(22!) of OEIS sequence A062439:
Prime(22!) = 57762800476687420222169.

No new primes for puzzles 1127 and 1128:
Prime(22)! + Prime(22!) is composite,
Prime(22)! - Prime(22!) is composite too.

I used the program "primecount" by Kim Walisch.
Quoting his explanation about fast nth prime computation.
"The most efficient known method for calculating the nth prime is a combination of the prime counting function and a prime sieve.
The idea is to closely approximate the nth prime e.g. using the inverse logarithmic integral or the inverse Riemann R function and then count the primes up to this guess using the prime counting function.
Once this is done one starts sieving (e.g. using the segmented sieve of Eratosthenes) from there on until one finds the actual nth prime."

Target index:
n = 22! = 1124000727777607680000.
Guess 1, using the inverse logarithmic integral:
x_1 = 57762800476481495425024.
Guess 2, using the inverse Riemann R function:
x_2 = 57762800476731842462240.
Actual number of primes up to guess 2:
n_2 = Pi(x_2) = 1124000727778455251835.
Sieving backwards:
x = 57762800476687420222169 is prime,
Pi(x) = n,
Pi(x-1) = n-1,

nth prime found.



Records   |  Conjectures  |  Problems  |  Puzzles