close
login
A384181
Primes p such that k! + p or |k! - p| is composite for all k >= 0.
0
2, 3, 71, 97, 179, 181, 211, 223, 251, 283, 431, 503, 577, 827, 857, 971, 1019, 1021, 1109, 1213, 1249, 1259, 1279, 1289, 1373, 1427, 1429, 1483, 1571, 1609, 1619, 1637, 1699, 1709, 1759, 1801, 2053, 2129, 2141, 2213, 2269, 2281, 2293, 2297, 2339, 2381, 2477, 2503
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
Sequence in context: A386007 A290329 A145531 * A140546 A234237 A276197
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