cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A116886 Primes p that remain prime through at least 2 iterations of the function f(p) = p^2 + 4.

Original entry on oeis.org

3, 17, 103, 137, 277, 313, 677, 743, 1117, 1627, 2003, 2143, 3407, 3677, 4483, 5087, 5903, 7177, 7333, 8087, 8093, 8147, 8537, 8573, 9293, 9473, 10177, 10477, 11173, 13807, 14897, 15107, 16657, 19753, 21563, 22307, 24113, 26113, 26417, 26633
Offset: 1

Views

Author

Giovanni Resta, Feb 27 2006

Keywords

Comments

Numbers p with the property that p, q = p^2 + 4, and r = q^2 + 4 are all prime. - Zak Seidov, Sep 08 2009
a(n) = sqrt(A165218(n) - 4). - Zak Seidov, Sep 08 2009

Examples

			17 is prime, 17^2 + 4 = 293 is prime and 293^2 + 4 = 85853 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[2*7! ]],PrimeQ[ #^2+4]&&PrimeQ[(#^2+4)^2+4]&] (* Vladimir Joseph Stephan Orlovsky, Feb 26 2010 *)
    fQ[n_]:=AllTrue[Rest[NestList[#^2+4&,n,2]],PrimeQ]; Select[Prime[ Range[ 3000]],fQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 21 2014 *)
  • PARI
    is(n)=my(q);isprime(p) && isprime(q=p^2+4) && isprime(q^2+4) \\ Charles R Greathouse IV, Nov 06 2013

Extensions

Edited by N. J. A. Sloane, Sep 18 2009 at the suggestion of R. J. Mathar

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

Views

Author

Giovanni Resta, Feb 27 2006

Keywords

Examples

			p=5087, f(p)= 25877573, f(f(p))= 669648784370333 and f(f(f(p)))= 448429494408664742387290530893 are all primes.
		

Crossrefs

Programs

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

Views

Author

Giovanni Resta, Feb 27 2006

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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 *)

A231235 Primes q of the form p^2 + 4 (p prime) such that r = q^2 + 4, s = r^2 + 4 and t = s^2 + 4 are all prime.

Original entry on oeis.org

93738231893, 2365771484804813, 4185535280578373, 4658429282719973, 7706774555568173, 7711174427503853, 25756066576859093, 65522912397466973, 80107252841869013, 105371595617867573, 130831138562692133, 174460360753737533, 201928181545454813, 204300010667474573
Offset: 1

Views

Author

Zak Seidov, Nov 06 2013

Keywords

Comments

The next iteration is impossible: t^2 + 4 is divisible by 13.

Crossrefs

Subsequence of A231120 and A165218.
Cf. A116889.

Programs

  • Mathematica
    extnd[p_]:=NestList[#^2+4&,p,4]; #^2+4&/@Select[Prime[ Range[ 452*10^6]],AllTrue[Rest[extnd[#]],PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 06 2021 *)

Extensions

Definition corrected by Harvey P. Dale, Jun 06 2021
Showing 1-4 of 4 results.