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.

A237528 Numbers n of the form p^3-p^2-p-1 (for prime p) such that n^3-n^2-n-1 is prime.

Original entry on oeis.org

23518, 146014, 486718, 564814, 3285598, 4629406, 7151614, 11645326, 22584814, 29983198, 31754206, 64319998, 355897438, 745319086, 864614014, 1304555614, 2334990526, 2903803726, 3447511198, 3934332718, 4194050014, 4596374014, 5838479998, 6866219998
Offset: 1

Views

Author

Derek Orr, Feb 09 2014

Keywords

Comments

All numbers are congruent to 4 mod 10, 6 mod 10, or 8 mod 10.

Examples

			23518 = 29^3-29^2-29-1 (29 is prime) and 23518^3-23518^2-23518-1 = 13007166227989 is prime. Thus, 23518 is a member of this sequence.
		

Crossrefs

Cf. A162295.

Programs

  • Mathematica
    f[n_] := n^3 - n^2 - n - 1; f[ Select[ Prime@ Range[2,740],PrimeQ@ f@ f@#&]] (* Robert G. Wilson v, Mar 07 2014 *)
  • PARI
    s=[]; forprime(p=2, 40000, n=p^3-p^2-p-1; if(isprime(n^3-n^2-n-1), s=concat(s, n))); s \\ Colin Barker, Feb 10 2014
  • Python
    import sympy
    from sympy import isprime
    {print(n**3-n**2-n-1) for n in range(10**4) if isprime(n) and isprime((n**3-n**2-n-1)**3-(n**3-n**2-n-1)**2-(n**3-n**2-n-1)-1)}