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-10 of 24 results. Next

A045637 Primes of the form p^2 + 4, where p is prime.

Original entry on oeis.org

13, 29, 53, 173, 293, 1373, 2213, 4493, 5333, 9413, 10613, 18773, 26573, 27893, 37253, 54293, 76733, 85853, 94253, 97973, 100493, 120413, 139133, 214373, 237173, 253013, 299213, 332933, 351653, 368453, 375773, 458333, 552053, 619373
Offset: 1

Views

Author

Keywords

Comments

These are the only primes that are the sum of two primes squared. 11 = 3^2 + 2 is the only prime of the form p^2 + 2 because all primes greater than 3 can be written as p=6n-1 or p=6n+1, which allows p^2+2 to be factored. - T. D. Noe, May 18 2007
Infinite under the Bunyakovsky conjecture. - Charles R Greathouse IV, Jul 04 2011
All terms > 29 are congruent to 53 mod 120. - Zak Seidov, Nov 06 2013

Examples

			29 belongs to the sequence because it equals 5^2 + 4.
		

Crossrefs

The corresponding primes p are in A062324.
Subsequence of A005473 (and thus A185086).

Programs

  • Mathematica
    Select[Prime[ # ]^2+4&/@Range[140], PrimeQ]
  • PARI
    forprime(p=2,1e4,if(isprime(t=p^2+4),print1(t","))) \\ Charles R Greathouse IV, Jul 04 2011

Formula

a(n) = A062324(n)^2 + 4. - Zak Seidov, Nov 06 2013

Extensions

Edited by Dean Hickerson, Dec 10 2002

A157764 Primes p such that p^16 + 2^16 is also prime.

Original entry on oeis.org

89, 107, 127, 139, 173, 179, 229, 233, 349, 421, 461, 521, 557, 571, 727, 863, 991, 1019, 1051, 1069, 1433, 1459, 1627, 1747, 1831, 1877, 2081, 2083, 2591, 2837, 3229, 3319, 3361, 3541, 3677, 3697, 3761, 3877, 4201, 4229, 4259, 4271, 4349, 4451, 4561, 4591, 5011, 5119, 5147, 5171, 5531
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Mar 06 2009

Keywords

Comments

Primes Q = n^16 + 2^16 only for odd n note: Q is divisible by 97 if n = 97k +- 48, n = 97k +- 50, n = 97k +- 66, n = 97k +- 70, n = 97k +- 78, n = 97k +- 84, n = 97k +- 90, n = 97k +- 92 of course there are similar rules for each prime divisor.

Examples

			For n=89: 89^16 + 2^16 = 15496731425178936435099327796097 is prime and 89 is prime too.
For n=3: 3 is (first odd) prime but 3^16 + 2^16 = 43112257 = 3041*14177 (not prime).
For n=85: 85^16 + 2^16 = 7425108623606394726715087956161 is prime too, but 85 is not.
		

Crossrefs

Cf. A062324.

Programs

  • GAP
    Filtered(Filtered([1..10^3],IsPrime),p->IsPrime(p) and IsPrime(p^16+2^16)); # Muniru A Asiru, Feb 04 2018
  • Maple
    select(p->isprime(p) and isprime(p^16+2^16), [$1..10^4]); # Muniru A Asiru, Feb 04 2018
  • Mathematica
    Select[Prime[Range[800]],PrimeQ[#^16+65536]&] (* Harvey P. Dale, Sep 07 2019 *)
  • PARI
    isA157764(n) = isprime(n) && isprime(n^16+65536) \\ Michael B. Porter, Dec 17 2009
    

Extensions

More terms from Muniru A Asiru, Feb 05 2018

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

A118940 Primes p such that (p^2+7)/8 is prime.

Original entry on oeis.org

3, 7, 17, 23, 41, 47, 71, 89, 103, 113, 127, 137, 151, 191, 193, 199, 223, 263, 271, 281, 337, 359, 401, 439, 457, 503, 521, 569, 577, 599, 641, 719, 727, 751, 839, 857, 863, 881, 887, 929, 991, 1009, 1033, 1097, 1103, 1151, 1193, 1217, 1231, 1279, 1297, 1303
Offset: 1

Views

Author

T. D. Noe, May 06 2006

Keywords

Comments

For all primes q>2, we have q=4k+-1 for some k, which makes it easy to show that 8 divides q^2+7.

Crossrefs

Similar sequences, with p and (p^2+a)/b both prime, are A048161, A062324, A062326, A062718, A109953, A110589, A118915, A118918, A118939, A118941 and A118942.

Programs

  • Mathematica
    Select[Prime[Range[200]],PrimeQ[(#^2+7)/8]&]
  • PARI
    lista(nn) = {forprime(p=2, nn, iferr(if (isprime(q=(p^2+7)/8), print1(q, ", ")), E, ););} \\ Michel Marcus, Feb 18 2018

A176983 Primes p such that smallest prime q > p^2 is of form q = p^2 + k^2.

Original entry on oeis.org

2, 5, 7, 13, 17, 37, 47, 67, 73, 97, 103, 137, 163, 167, 193, 233, 277, 281, 293, 307, 313, 317, 347, 373, 389, 421, 439, 461, 463, 487, 499, 503, 547, 571, 577, 593, 607, 613, 661, 677, 691, 701, 739, 743, 769, 787, 821, 823, 827, 829, 853, 883, 953, 967, 983
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 30 2010

Keywords

Comments

By Fermat's 4n+1 theorem, q must be congruent to 1 (mod 4).
Corresponding values of k: 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 4, 4, 4, 6, 2, 2, 4, 2. - Zak Seidov, Nov 04 2013

Examples

			17 is here because 293 is the first prime after 17^2 and 293 = 17^2 + 2^2.
		

Crossrefs

A062324 is subsequence. - Zak Seidov, Nov 04 2013

Programs

  • Mathematica
    Select[Prime[Range[200]], IntegerQ[Sqrt[NextPrime[ #^2] - #^2]] & ]

Extensions

Edited and extended by T. D. Noe, May 12 2010

A263722 Integers k > 0 such that k^2 + p^2 is composite for all primes p.

Original entry on oeis.org

9, 11, 19, 21, 23, 25, 29, 31, 39, 41, 43, 49, 51, 53, 55, 59, 61, 63, 69, 71, 75, 77, 79, 81, 83, 89, 91, 93, 99, 101, 105, 107, 109, 111, 113, 119, 121, 123, 127, 129, 131, 133, 139, 141, 143, 145, 149, 151, 153, 157, 159, 161, 165, 169, 171, 173, 175, 179, 181, 185, 187, 189, 191, 195, 197, 199
Offset: 1

Views

Author

Keywords

Comments

Conjecture: All terms are odd. An equivalent conjecture in A263977 is that if k > 0 is even, then k^2 + p^2 is prime for some prime p. We have checked this for all k <= 12*10^7.
An odd number k is a term if and only if k^2 + 2^2 is composite, since k^2 + p^2 is even and > 2 (hence composite) for all odd primes p. Thus if the Conjecture is true, then the sequence is simply odd k such that k^2 + 4 is composite. The sequence of odd k, such that k^2 + 4 is prime, is A007591.
The complementary sequence is A263977. Given k in it, the smallest prime p, such that k^2 + p^2 is prime, is in A263726. These numbers k^2 + p^2 form A185086, the Fouvry-Iwaniec primes.

Examples

			9^2 + 2^2 = 85 = 5*17, 11^2 + 2^2 = 125 = 5^3, and 23^2 + 2^2 = 533 = 13*41 are composite, so 9, 11, and 23 are members.
1^2 + 2^2 = 5 and 2^2 + 3^3 = 13 are prime, so 1, 2, and 3 are not members.
		

Crossrefs

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

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

Views

Author

Giovanni Resta, Feb 27 2006

Keywords

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.

Examples

			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

Extensions

Typo in Example fixed by Zak Seidov, Nov 07 2013

A118939 Primes p such that (p^2+3)/4 is prime.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 29, 31, 41, 43, 67, 83, 101, 109, 139, 151, 157, 179, 181, 199, 211, 223, 239, 263, 277, 283, 307, 311, 337, 347, 353, 379, 389, 419, 431, 463, 491, 557, 577, 587, 619, 659, 673, 739, 757, 797, 809, 811, 829, 853, 907, 911, 953, 991, 1051
Offset: 1

Views

Author

T. D. Noe, May 06 2006

Keywords

Comments

For all primes q>2, we have q=4k+-1 for some k, which makes it easy to show that 4 divides q^2+3. Similar sequences, with p and (p^2+a)/b both prime, are A048161, A062324, A062326, A062718, A109953, A110589, A118915, A118918, A118940, A118941 and A118942.

Programs

  • Mathematica
    Select[Prime[Range[200]],PrimeQ[(#^2+3)/4]&]

A158361 Primes p with property that Q = p^4 + 2^4 is prime.

Original entry on oeis.org

3, 5, 7, 11, 17, 19, 23, 37, 41, 59, 61, 71, 79, 97, 131, 139, 179, 223, 227, 229, 241, 283, 313, 317, 359, 367, 379, 383, 389, 439, 449, 461, 487, 503, 521, 569, 593, 617, 619, 631, 661, 683, 709, 733, 811, 821, 853, 911, 977, 1049, 1061, 1063, 1069, 1091, 1093, 1117
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Mar 17 2009

Keywords

Comments

Q is always congruent to 1 (mod 4).
Q is divisible by 17 if p is congruent to 1, 4, 13, or 16 (mod 17).
It is conjectured that sequence a(n) is infinite.
Q is in A094479. - Zak Seidov, Jul 08 2020

Examples

			3 is in the sequence since for p=3: p^4+2^4 = 3^4+16 = 97 is prime.
29 is not in the sequence since 29^4+2^4 = 707297 = 73 x 9689 is not prime.
		

References

  • Leonard E. Dickson, History of the Theory of numbers, vol. I, Dover Publications 2005
  • Richard Guy, "Unsolved Problems in Number Theory"

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(2000) | IsPrime(p^4+16)]; // Vincenzo Librandi, Jun 18 2014
  • Mathematica
    Select[Range[10^3], PrimeQ[#] && PrimeQ[#^4 + 16] &] (* Vincenzo Librandi, Jun 18 2014 *)
    Select[Prime[Range[200]],PrimeQ[#^4+16]&] (* Harvey P. Dale, Jun 23 2014 *)
  • PARI
    isA158361(n) = isprime(n) && isprime(n^4+16)
    

Extensions

Corrected and edited by Michael B. Porter, Dec 17 2009
Showing 1-10 of 24 results. Next