login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A116889
a(n) is the least prime p that remains prime through n iterations of function f(p)=p^2+4.
4
2, 3, 3, 5087, 306167
OFFSET
0,1
COMMENTS
The sequence is finite, since it can be proved that if p, f(p), f(f(p)), f(f(f(p))) and f(f(f(f(p)))) are all primes, then the next iteration gives a multiple of 13, greater than 13, thus a(k) for k>=5 does not exist.
EXAMPLE
a(0)=2 since f(2)=8 is not prime. a(1)=a(2)=3 since both f(3)=13 and f(f(3))=173 are primes.
CROSSREFS
KEYWORD
fini,full,nonn
AUTHOR
Giovanni Resta, Feb 27 2006
EXTENSIONS
Typo in Example fixed by Zak Seidov, Nov 07 2013
STATUS
approved