OFFSET
1,1
COMMENTS
It is unknown whether there exists a prime p such that k! + p is composite for all k > = 0 (see A082470).
Every prime p in this list satisfies that at least one of the numbers k! + p, |k! - p| is composite; i.e., they cannot both be prime, for k >= 0.
EXAMPLE
71 is in this sequence, since k! + 71 is prime only when k = 2, 5, 9, 14, 22, 43, 53 and 55, but |k! - 71| is composite for such values of k.
PROG
(Python)
from sympy import isprime, primerange, factorial
def ok(p):
return not any(isprime((fk := factorial(k)) + p) and isprime(abs(fk - p)) for k in range(1, p))
print([p for p in primerange(2, 500) if ok(p)])
CROSSREFS
KEYWORD
nonn
AUTHOR
Gonzalo MartÃnez, May 21 2025
EXTENSIONS
a(17)-a(23) from Sean A. Irvine, May 28 2025
a(24)-a(48) from Michael S. Branicky, May 29 2025
STATUS
approved
