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.

A384181 Primes p such that k! + p or |k! - p| is composite for all k >= 0.

Original entry on oeis.org

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

Views

Author

Gonzalo Martínez, May 21 2025

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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)])

Extensions

a(17)-a(23) from Sean A. Irvine, May 28 2025
a(24)-a(48) from Michael S. Branicky, May 29 2025