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!)
A266235 Primes representable as f(f(f(...f(p)...))) where p is a prime and f(x) = x^2 + 1. 1
5, 101, 677, 28901, 3422501, 4884101, 260176901, 4784488901, 5887492901, 7370222501, 12898144901, 14498568101, 24840912101, 38514062501, 47563248101, 56249608901, 64014060101, 110842384901, 123657722501, 135755402501, 205145584901, 279343960901, 288680544101 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
For p>2, f(x) is applied an even number of times, twice at least.
LINKS
EXAMPLE
a(2) = f(f(3)) = (3^2 + 1)^2 + 1 = 101.
a(3) = f(f(5)) = (5^2 + 1)^2 + 1 = 677.
MATHEMATICA
Take[Union@ Flatten[Table[Nest[#^2 + 1 &, Prime@ n, #], {n, 150}] & /@ Range@ 6] /. n_ /; CompositeQ@ n -> Nothing, 23] (* Michael De Vlieger, Jan 06 2016 *)
PROG
(Python)
from sympy import isprime
a=[]
TOP=1000000
for p in range(TOP):
if isprime(p):
q=p
while q<TOP:
q = q*q+1
if isprime(q):
a.append(q)
print(sorted(set(a)))
CROSSREFS
Sequence in context: A081220 A210362 A041187 * A266452 A354332 A074790
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Dec 25 2015
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 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)