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 17 results. Next

A049500 Smallest prime p such that p + 4^k is also prime for all k = 1, ..., n.

Original entry on oeis.org

3, 3, 3, 7, 7, 37, 37, 163, 671353, 13243063, 5906322013, 12087247687, 1523351345443, 1523351345443, 23631302781703
Offset: 1

Views

Author

Keywords

Comments

a(13) > 10^11. - Donovan Johnson, Dec 02 2009
All terms from a(4) satisfy p == 7 or 13 (mod 30); a(16) > 10^14. - Mikk Heidemaa, May 12 2025

Examples

			Prime 3 generates the {3,7,19,67} exponential prime-chain of length 4 if the start is also counted.
The smallest "exponential 11-chain" starts with 13243063 as follows: 13243063, 13243067, 13243079, 13243127, 13243319, 13244087, 13247159, 13259447, 13308599, 13505207, 14291639.
		

Crossrefs

Programs

  • Mathematica
    Table[p = 2; While[Times @@ Boole@ PrimeQ[p + 4^Range@ n] != 1, p = NextPrime@ p]; p, {n, 10}] (* Michael De Vlieger, Mar 05 2017 *)
  • PARI
    okchain(n, p)=for (k=1, n, if (! isprime(p + 4^k), return (0));); return (1);
    a(n) = {p = 2; while (! okchain(n, p), p = nextprime(p+1)); p;} \\ Michel Marcus, Dec 17 2013

Extensions

a(11)-a(12) from Donovan Johnson, Dec 02 2009
a(13)-a(15) from Mikk Heidemaa, May 12 2025

A092120 a(n) is the first term p in a sequence of primes such that p+4m^2 is prime for m = 0 to n, but composite for m = n+1; a(n) = -1 if no such prime exists.

Original entry on oeis.org

2, 19, 3, 277, 43, 53593, 7, 67, 37, 1483087, 1867783, 9671300983, 376040154163, 13491637509487, 604490757900187, 409333
Offset: 0

Views

Author

Ray G. Opao, Mar 29 2004

Keywords

Comments

Similar to A092474 except that a(n)+4m^2 is composite for m = n+1.
a(19)=163. All other terms after a(15) are greater than 10^17 (if they exist). [From Jens Kruse Andersen, Oct 24 2008]

Examples

			a(3) = 277 because 277, 277 + 2^2 = 281, 277 + 4^2 = 293, and 277 + 6^2 = 313 are all prime, but 277 + 8^2 = 341 = 11*31 is composite, and there is no smaller prime with this property.
a(4) = 43: 43+4*1^2 = 47, which is prime. 43+4*2^2 = 59, which is prime. 43+4*3^2 = 79, which is prime. 43+4*4^2 = 107, which is prime. 43+4*5^2 = 143 = 11*13, which is composite.
		

Crossrefs

Cf. A000040 (the prime numbers), A023200 (primes p such that p + 4 is also prime), A049492 (primes p such that p + 4 and p + 16 are also prime), A092475 (primes p such that p + 4, p + 16 and p + 36 are also prime).

Extensions

Correction and a(11) - a(15) from Jens Kruse Andersen, Oct 24 2008
Edited by N. J. A. Sloane, Feb 08 2019, merging this with an essentially identical sequence submitted by Jon E. Schoenfield, Feb 02 2019

A246842 Primes p such that p + m^2 is prime for all m in {2,4,6,8,10,12,14,16}.

Original entry on oeis.org

37, 163, 56893, 409333, 1483087, 1867783, 10101463, 18292957, 31284493, 52896517, 58048057, 157861663, 175933717, 180336193, 222640867, 258001837, 276739747, 349693117, 371305267, 445890307, 543764323, 613305067, 678551833, 748576753, 828497443
Offset: 1

Views

Author

Zak Seidov, Sep 05 2014

Keywords

Comments

Primes p such that p + m^2, m = 2,4,6,8,10,12,14,16,18 are all primes:
163, 409333, 1483087, 1867783, 222640867, 258001837, 371305267, 748576753, 828497443, 1235054137, ...
Primes p such that p + m^2, m = 2,4,6,8,10,12,14,16,18,20 are all primes:
163, 409333, 828497443, ...

Crossrefs

Programs

  • PARI
    s=[]; forprime(p=2, 10e9, forstep(i=2, 16, 2, if(!isprime(p+i^2), next(2))); s=concat(s, p)); s \\ Colin Barker, Sep 05 2014

Extensions

Typos in data and comments fixed by Colin Barker, Sep 05 2014

A049495 a(n) and a(n)+4^k are primes at least for k=1,2,3,4,5.

Original entry on oeis.org

7, 37, 163, 9157, 9277, 15667, 53593, 56893, 111577, 135193, 137383, 142543, 305407, 467527, 470647, 476023, 480043, 527377, 607093, 671353, 761377, 817147, 885943, 891643, 904663, 1080073, 1116637, 1140847, 1172803, 1233523
Offset: 1

Views

Author

Keywords

Examples

			7, 7+4=11, 7+16=23, 7+64=71, 7+256=263, 7+1024=1031 are all primes; the smallest such a sextuple is {7,11,23,71,263,1031}.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range[10^5], Function[p, AllTrue[Range@ 5, PrimeQ[p + 4^#] &]]] (* Michael De Vlieger, Aug 09 2017 *)
  • PARI
    isok(n) = isprime(n) && isprime(n+4) && isprime(n+16) && isprime(n+64) && isprime(n+256) && isprime(n+1024); \\ Michel Marcus, Dec 22 2013

A247269 Primes p such that p + m^2 is prime for all m in {2,4,6,8,10,12,14,16,18}.

Original entry on oeis.org

163, 409333, 1483087, 1867783, 222640867, 258001837, 371305267, 748576753, 828497443, 1235054137, 2059599067, 5767711867, 5929920613, 8965599883, 9055004953, 9170160343, 9655686727, 9670115977, 9671300983, 10646399437, 12253792783, 12627473917, 19635778453
Offset: 1

Views

Author

Zak Seidov, Sep 11 2014

Keywords

Comments

All terms are == 1 mod 6, and == {7, 13} mod 30.
Subsequence of A246842.

Crossrefs

Programs

  • PARI
    forprime(p=1,10^12,c=0;for(i=1,9,if(ispseudoprime(p+(2*i)^2),c++);if(!ispseudoprime(p+(2*i)^2),break));if(c==9,print1(p,", "))) \\ Derek Orr, Sep 11 2014
    
  • PARI
    is(n)=my(t=n%5); if(t!=2 && t!=3, return(0)); forstep(i=4,18,2, if(!isprime(n+i^2),return(0))); isprime(n) && isprime(n+4)
    p=2; forprime(q=3,1e12, if(q-p==4 && is(p), print1(p", ")); p=q) \\ Charles R Greathouse IV, Sep 11 2014

A049493 Numbers n such that n and n+4^k are all primes for k=1,2,3.

Original entry on oeis.org

3, 7, 37, 43, 67, 163, 757, 823, 967, 1087, 1213, 1303, 1423, 2293, 2377, 3187, 3343, 3847, 5653, 5923, 8677, 8803, 9157, 9277, 9787, 11257, 11617, 11923, 12097, 13693, 14653, 14767, 14827, 15667, 15733, 16417, 18127, 18397, 20113, 20743, 26293
Offset: 1

Views

Author

Keywords

Examples

			3, 3+4=7, 3+16=19, 3+64=67 are all primes.
		

Crossrefs

Subsequence of A049492.

Programs

  • Mathematica
    Select[Prime[Range[3000]],And@@PrimeQ[#+4^{1,2,3}]&] (* Harvey P. Dale, Dec 26 2013 *)
    Select[Prime[Range[3000]],AllTrue[#+{4,16,64},PrimeQ]&] (* Harvey P. Dale, Dec 29 2024 *)
  • PARI
    isok(n) = isprime(n) && isprime(n+4) && isprime(n+16) && isprime(n+64); \\ Michel Marcus, Dec 22 2013

Formula

A049492 INTERSECT A049490. - R. J. Mathar, Mar 26 2024

A049494 a(n) and a(n)+4^k are primes at least for k=1,2,3,4.

Original entry on oeis.org

7, 37, 163, 757, 967, 1303, 2293, 2377, 8677, 8803, 9157, 9277, 14827, 15667, 16417, 20113, 27763, 29863, 41953, 53593, 56527, 56893, 61027, 67153, 69763, 74827, 79333, 83203, 90007, 95467, 111577, 129277, 135193, 137383, 142543, 151783
Offset: 1

Views

Author

Keywords

Examples

			7,7+4=11,7+16=23,7+64=71,7+256=263 are all primes: it is the smallest such quintet.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[15000]],AllTrue[#+{4,16,64,256},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 22 2018 *)
  • PARI
    isok(n) = isprime(n) && isprime(n+4) && isprime(n+4^2) && isprime(n+4^3) && isprime(n+4^4); \\ Michel Marcus, Dec 31 2013

A049497 a(n) and a(n)+4^k are primes at least for k=1,2,3,4,5,6,7.

Original entry on oeis.org

37, 163, 15667, 142543, 607093, 671353, 1457857, 2694157, 2979043, 4890307, 5772097, 6404773, 9139453, 10669003, 11170933, 11218747, 11905987, 13243063, 15130537, 18116473, 19433863, 21960577, 23524183, 25946083, 32380177, 45600157, 46960747, 51905137
Offset: 1

Views

Author

Keywords

Examples

			37, 37+4=41, 37+16=53, 37+64=101, 37+256=293, 37+1024=1061, 37+4096=4133, 37+16384=16421 are all primes; the smallest such a 8-chain of primes is {37,41,53,101,293,1061,4133,16421}.
		

Crossrefs

Programs

  • Maple
    filter:= n -> andmap(isprime, [n,n+4,n+4^2,n+4^3,n+4^4,n+4^5,n+4^6,n+4^7]):
    select(filter, [seq(i,i=7..10^7,6)]); #Robert Israel, Nov 11 2019
  • PARI
    isok(n) = isprime(n) && isprime(n+4) && isprime(n+16) && isprime(n+64) && isprime(n+256) && isprime(n+1024) && isprime(n+4096) && isprime(n+16384); \\ Michel Marcus, Dec 22 2013

Formula

A023200 INTERSECT A269859. - R. J. Mathar, Mar 26 2024

Extensions

More terms from Michel Marcus, Dec 22 2013

A247273 Primes p such that p + m^2 is prime for all m in {2,4,6,8,10,12,14,16,18,20,22}.

Original entry on oeis.org

163, 409333, 9671300983, 186521536807, 376040154163, 459775038913, 485142116713, 773464440907, 916792710667, 982557050143, 1087801149583, 1213507492723, 1822896797857, 2131006835017, 3026318319523, 4617478214407, 5141744558017, 6552892412047, 6629618954863, 6787014897877, 7636453217677, 7788411508483, 8311114648153, 8547311473387, 8668135024957, 9206471763547
Offset: 1

Views

Author

Zak Seidov, Sep 11 2014

Keywords

Comments

All terms are == {7, 13} mod 30.
Subsequence of A145741.

Crossrefs

Programs

  • PARI
    forprime(p=1,10^12,c=0;for(i=1,11,if(ispseudoprime(p+(2*i)^2),c++));if(c==11,print1(p,", "))) \\ Derek Orr, Sep 11 2014

A049496 a(n) and a(n)+4^k are primes at least for k=1,2,3,4,5,6.

Original entry on oeis.org

37, 163, 15667, 53593, 142543, 305407, 607093, 671353, 904663, 1172803, 1233523, 1351837, 1378843, 1389217, 1457857, 1686133, 1842523, 1867783, 2451793, 2668213, 2694157, 2979043, 3095227, 4228723, 4890307, 5535853, 5772097, 5859613, 6404773, 6827503, 6933067
Offset: 1

Views

Author

Keywords

Examples

			37, 37+4=41, 37+16=53, 37+64=101, 37+256=293, 37+1024=1061, 37+4096=4133 are all primes; the smallest such a 7-chain is {37,41,53,101,293,1061,4133}.
		

Crossrefs

Programs

  • PARI
    isok(n) = isprime(n) && isprime(n+4) && isprime(n+16) && isprime(n+64) && isprime(n+256) && isprime(n+1024) && isprime(n+4096); \\ Michel Marcus, Dec 22 2013

Formula

A023200 INTERSECT A269259. - R. J. Mathar, Mar 26 2024

Extensions

More terms from Michel Marcus, Dec 22 2013
Showing 1-10 of 17 results. Next