A116887
Primes p that remain prime through at least 3 iterations of function f(p)=p^2+4.
Original entry on oeis.org
5087, 11173, 16657, 47017, 54503, 185243, 207643, 300413, 306167, 341813, 391387, 849047, 1348577, 1438223, 1502923, 1857407, 1909267, 2121737, 2161163, 2288773, 2610133, 2725157, 2744723, 2779097, 2874463, 2881327, 3079927, 3149077, 3154483, 3173683, 3194483
Offset: 1
p=5087, f(p)= 25877573, f(f(p))= 669648784370333 and f(f(f(p)))= 448429494408664742387290530893 are all primes.
A116889
a(n) is the least prime p that remains prime through n iterations of function f(p)=p^2+4.
Original entry on oeis.org
2, 3, 3, 5087, 306167
Offset: 0
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.
A165218
Primes q of the form q=p^2+4 (p=prime) such that r=q^2+4 is also prime.
Original entry on oeis.org
13, 293, 10613, 18773, 76733, 97973, 458333, 552053, 1247693, 2647133, 4012013, 4592453, 11607653, 13520333, 20097293, 25877573, 34845413, 51509333, 53772893, 65399573, 65496653, 66373613, 72880373, 73496333, 86359853, 89737733
Offset: 1
Prime q=13=p^2+4 (p=3) and r=q^2+4=13^2+4=173 (prime).
Prime q=293=p^2+4 (p=17) and r=q^2+4=293^2+4=85853 (prime).
-
Reap[For[p = 2, p < 10^4, p = NextPrime[p], If[PrimeQ[q = p^2+4] && PrimeQ[q^2+4], Print[q]; Sow[q]]]][[2, 1]] (* Jean-François Alcover, Nov 07 2013 *)
Select[Prime[Range[2000]]^2+4,AllTrue[{#,#^2+4},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 13 2018 *)
A116888
Primes p that remain prime through 4 iterations of the function f(p) = p^2 + 4.
Original entry on oeis.org
306167, 48639197, 64695713, 68252687, 87788237, 87813293, 160486967, 255974437, 283032247, 324609913, 361705873, 417684523, 449364197, 451995587, 454052213, 466037563, 536504713, 574746467, 596095613
Offset: 1
p = 306167, f(p) = 93738231893, f(f(p)) = 8786856118425842363453, f(f(f(p))) = 77208840445917661077402487029419236950083213 and the 88-digit number f(f(f(f(p)))) are all prime numbers.
-
Select[Prime[Range[9! ]],PrimeQ[ #^2+4]&&PrimeQ[(#^2+4)^2+4]&&PrimeQ[((#^2+4)^2+4)^2+4]&&PrimeQ[(((#^2+4)^2+4)^2+4)^2+4]&] (* Vladimir Joseph Stephan Orlovsky, Feb 26 2010 *)
p4Q[p_]:=AllTrue[NestList[#^2+4&,p,4],PrimeQ]; Select[Prime[Range[312*10^5]],p4Q] (* Harvey P. Dale, Nov 20 2023 *)
Showing 1-4 of 4 results.
Comments