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!)
A238447 Primes p such that f(p) and f(f(p)) are both prime, where f(x) = x^2-x-1. 1
3, 487, 617, 677, 751, 1201, 1289, 1579, 1747, 2027, 2267, 2269, 2309, 3259, 3947, 4457, 4567, 4621, 4637, 4799, 4951, 5701, 6029, 6991, 7151, 7687, 7867, 9187, 9209, 9341, 9587, 9829, 11321, 12301, 12541, 12781, 13177, 13649, 15919, 16349 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Intersection of A230026 and A091567.
Note that f(f(f(p))) is always composite. - Zak Seidov, Nov 10 2014
LINKS
EXAMPLE
3 is prime, 3^2-3-1 = 5 is prime, and (3^2-3-1)^2-(3^2-3-1)-1 = 19 is prime. Thus, 3 is a member of this sequence.
MATHEMATICA
Select[Prime[Range[2000]], AllTrue[Rest[NestList[#^2-#-1&, #, 2]], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 03 2017 *)
PROG
(Python)
import sympy
from sympy import isprime
def f(x):
..return x**2-x-1
{print(p) for p in range(10**5) if isprime(p) and isprime(f(p)) and isprime(f(f(p)))}
CROSSREFS
Sequence in context: A203681 A195611 A230029 * A241977 A045616 A198705
KEYWORD
nonn
AUTHOR
Derek Orr, Feb 26 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 March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)