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.

A238445 Primes p such that f(f(p)) is prime, where f(x) = x^5-x^4-x^3-x^2-x-1.

Original entry on oeis.org

3, 13, 61, 103, 193, 199, 307, 431, 569, 977, 1201, 1451, 1481, 1609, 1669, 1889, 2371, 2381, 2711, 2819, 3083, 3469, 4289, 4337, 4567, 5231, 5501, 6733, 7043, 7253, 7351, 7549, 8707, 9257, 9497, 10039, 10687, 11491, 12227, 12517, 12941, 13397
Offset: 1

Views

Author

Derek Orr, Feb 26 2014

Keywords

Examples

			3 is prime. 3^5-3^4-3^3-3^2-3-1 = 122 and 122^5-122^4-122^3-122^2-122-1 = 26803717321 is a prime number. Thus, 3 is a member of this sequence.
		

Crossrefs

Programs

  • Python
    import sympy
    from sympy import isprime, primerange
    def f(x):
        return x**5-x**4-x**3-x**2-x-1
    [p for p in primerange(2, 10**5) if isprime(f(f(p)))]