login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A230027 Primes p such that f(f(p)) is prime, where f(x) = x^3-x^2-x-1. 0
29, 53, 79, 83, 149, 167, 193, 227, 283, 311, 317, 401, 709, 907, 953, 1093, 1327, 1427, 1511, 1579, 1613, 1663, 1801, 1901, 1987, 2027, 2029, 2293, 2341, 2741, 2887, 3083, 3163, 3229, 3329, 3511, 3733, 4007, 4127, 4153, 4337, 4789, 5531 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
29 is prime and (29^3-29^2-29-1)^3 - (29^3-29^2-29-1)^2 - (29^3-29^2-29-1) - 1 = 13007166227989 is prime. Thus, 29 is a member of this sequence.
MATHEMATICA
f[n_] := n^3 - n^2 - n - 1; Select[ Prime@ Range[2, 740], PrimeQ@ f@ f@# &] (* Robert G. Wilson v, Mar 07 2014 *)
PROG
(Python)
import sympy
from sympy import isprime
def f(x):
..return x**3-x**2-x-1
{print(p) for p in range(10**4) if isprime(p) and isprime(f(f(p)))}
CROSSREFS
Sequence in context: A164075 A117328 A274227 * A105406 A124284 A054822
KEYWORD
nonn
AUTHOR
Derek Orr, Feb 23 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 09:42 EDT 2024. Contains 371935 sequences. (Running on oeis4.)