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

A034962 Primes that are the sum of three consecutive primes.

Original entry on oeis.org

23, 31, 41, 59, 71, 83, 97, 109, 131, 173, 199, 211, 223, 251, 269, 311, 349, 439, 457, 487, 503, 607, 661, 701, 829, 857, 883, 911, 941, 1033, 1049, 1061, 1151, 1187, 1229, 1249, 1303, 1367, 1381, 1409, 1433, 1493, 1511, 1553, 1667, 1867, 1931, 1973, 1993
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Comments

Or, primes in A034961 (Sums of three consecutive primes). - Zak Seidov, Feb 16 2011

Examples

			E.g., 131 = 41 + 43 + 47.
A034962(n) = p+q+r, where p = A073681(n), and p<q<r are three consecutive primes. - _Zak Seidov_, Mar 09 2009
		

Crossrefs

Cf. A001043, A011974, A034707, A034961. Different from A050207.
Cf. A073681 (smallest of three consecutive primes whose sum is a prime).

Programs

  • Magma
    [a: n in [1..150] | IsPrime(a) where a is NthPrime(n)+NthPrime(n+1)+NthPrime(n+2)]; // Vincenzo Librandi, Jun 23 2016
    
  • Maple
    a:=proc(n) if isprime(ithprime(n)+ithprime(n+1)+ithprime(n+2))=true then ithprime(n)+ithprime(n+1)+ithprime(n+2) else fi end: seq(a(n), n=1..120); # Emeric Deutsch, Apr 24 2006
  • Mathematica
    a = {}; Do[k = Prime[x] + Prime[x + 1] + Prime[x + 2]; If[PrimeQ[k], AppendTo[a, k]], {x, 1, 350}]; a (* Artur Jasinski, Jan 27 2007 *)
    Select[(Plus@@@Partition[Prime[Range[200]],3,1]),PrimeQ] (* Zak Seidov, Feb 07 2012 *)
    Select[ListConvolve[{1,1,1},Prime[Range[200]]],PrimeQ] (* Harvey P. Dale, Jul 12 2013 *)
  • PARI
    forprime(p=2,1000, p2=nextprime(p+1); p3=nextprime(p2+1); q=p+p2+p3; if(isprime(q),print1(q",")) ) \\ Max Alekseyev, Jan 26 2007
    
  • PARI
    {p=2;q=3;for(n=1,100,r=nextprime(q+1); if(isprime(t=p+q+r),print1(t","));p=q;q=r;)} \\ Zak Seidov, Mar 09 2009
    
  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        p, q, r = 2, 3, 5
        while True:
            if isprime(p+q+r): yield p+q+r
            p, q, r = q, r, nextprime(r)
    print(list(islice(agen(), 50))) # Michael S. Branicky, Dec 27 2022

A152468 Smallest of five consecutive primes whose sum is a prime.

Original entry on oeis.org

5, 7, 11, 13, 19, 29, 31, 43, 53, 59, 67, 73, 79, 107, 109, 113, 127, 137, 149, 151, 157, 163, 179, 191, 211, 223, 229, 263, 269, 307, 311, 349, 353, 359, 379, 383, 401, 409, 419, 433, 443, 449, 461, 467, 479, 521, 523, 541, 557, 569, 571, 577, 599, 613, 619
Offset: 1

Views

Author

Keywords

Comments

Surprisingly many terms are also in A073681. - Zak Seidov, Dec 17 2012

Crossrefs

Programs

  • Mathematica
    lst={};Do[p0=Prime[n];p1=Prime[n+1];p2=Prime[n+2];p3=Prime[n+3];p4=Prime[n+4];If[PrimeQ[p=p0+p1+p2+p3+p4],AppendTo[lst,p0]],{n,6!}];lst
    Transpose[Select[Partition[Prime[Range[500]], 5, 1], PrimeQ[Total[#]] &]][[1]] (* Harvey P. Dale, Jun 05 2013 *)
    Prime[Select[Range[150], PrimeQ[Sum[Prime[# + i], {i, 0, 4}]] &]] (* Bruno Berselli, Aug 21 2013 *)
  • PARI
    {a=2; b=3; c=5; d=7; e=11; for(n=1,100, s=a+b+c+d+e;
    if(isprime(s), print1(a", ")); a=b; b=c; c=d; d=e; e=nextprime(e+2))} /* Zak Seidov, Dec 17 2012 */

Extensions

More cross references from Harvey P. Dale, Jun 05 2013

A072225 Numbers k such that prime(k) + prime(k+1) + prime(k+2) is prime.

Original entry on oeis.org

3, 4, 5, 7, 8, 9, 10, 11, 13, 16, 18, 19, 20, 22, 23, 26, 29, 34, 35, 37, 38, 45, 47, 50, 58, 60, 61, 62, 64, 68, 69, 70, 75, 77, 79, 80, 83, 87, 88, 90, 91, 94, 95, 97, 101, 113, 116, 119, 120, 121, 126, 128, 132, 133, 134
Offset: 1

Views

Author

Joseph L. Pe, Jul 04 2002

Keywords

Comments

The sequence contains 298884 terms <= 2000000, so nearly 15% of the numbers <= 2000000 are in the sequence. - Dmitry Kamenetsky, Aug 08 2015
Heuristically, we might expect the "probability" of n being in the sequence to be on the order of 1/log(n). - Robert Israel, Aug 09 2015
The first 8 consecutive integers in this sequence start from 8744076. - Dmitry Kamenetsky, Aug 28 2015
The first 9 consecutive integers in this sequence start from 697642916. - Dmitry Kamenetsky, Sep 08 2015
Vladimir Chirkov found that the first 10 and 11 consecutive integers in this sequence start from 23169509240 and 29165083170, respectively (see The Prime Puzzles link and A386275). - Dmitry Kamenetsky, Sep 08 2015

Examples

			9 is in the sequence because prime(9) + prime(10) + prime(11) = 23 + 29 + 31 = 83 is a prime.
		

Crossrefs

Cf. A386275 (first occurrences of runs).

Programs

  • Magma
    [n: n in [0..600]| IsPrime(NthPrime(n)+NthPrime(n+1)+NthPrime(n+2))]; // Vincenzo Librandi, Apr 06 2011
    
  • Maple
    a:=proc(n) if isprime(ithprime(n)+ithprime(n+1)+ithprime(n+2))=true then n else fi end: seq(a(n),n=1..150); # Emeric Deutsch, Apr 24 2006
  • Mathematica
    Select[Range[10^4], PrimeQ[Prime[ # ] + Prime[ # + 1] + Prime[ # + 2]] &]
  • PARI
    isok(n)=isprime(prime(n)+prime(n+1)+prime(n+2)) \\ Anders Hellström, Aug 20 2015

A180948 Smallest of seven (7) consecutive primes whose sum is a prime.

Original entry on oeis.org

17, 19, 23, 29, 31, 43, 47, 53, 61, 71, 79, 89, 97, 103, 107, 113, 127, 137, 151, 233, 257, 313, 317, 359, 367, 373, 379, 383, 401, 461, 463, 487, 499, 503, 509, 521, 577, 587, 617, 619, 761, 797, 821, 827, 839, 853, 881, 883, 907, 1019, 1061, 1063, 1069, 1097
Offset: 1

Views

Author

Carmine Suriano, Sep 27 2010

Keywords

Comments

There are twins such as (17,19); (461,463); (1061,1063).
There are also consecutives such as (17,19,23,29,31); (359,367,373,379,383); (1949,1951,1973).

Examples

			a(7)=47+53+59+61+67+71+73=431 is a prime.
		

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[500]],7,1],PrimeQ[Total[#]]&]] [[1]] (* Harvey P. Dale, Jun 05 2013 *)

Extensions

More cross references from Harvey P. Dale, Jun 05 2013

A180950 Smallest prime such that the sum of successive 11 primes is a prime.

Original entry on oeis.org

5, 7, 11, 13, 19, 23, 37, 41, 59, 101, 103, 107, 109, 113, 137, 149, 151, 157, 167, 173, 191, 269, 281, 283, 293, 307, 331, 349, 353, 359, 421, 431, 463, 479, 487, 499, 503, 569, 599, 607, 613, 617, 619, 677, 733, 761, 773, 823, 853, 883, 967, 977, 1051, 1087
Offset: 1

Views

Author

Carmine Suriano, Sep 27 2010

Keywords

Comments

Sum i=0 to 10 of prime(n+i) is a prime.
There are many twins: (11,13); (149,151); (1301,1303); (1997,1999); (8969,8971) ...
There are also consecutive primes: (101,103,107,109,113); (607,613,617,619); (8681,8689,8693)

Examples

			a(5)=19 since 19+23+29+31+37+41+43+47+53+59+61=443 is a prime.
		

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[500]], 11, 1], PrimeQ[Total[#]] &]][[1]] [[1]] (* Harvey P. Dale, Jun 05 2013 *)
    Prime[Select[Range[200], PrimeQ[Sum[Prime[# + i], {i, 0, 10}]] &]] (* Bruno Berselli, Aug 22 2013 *)

Extensions

More cross references from Harvey P. Dale, Jun 05 2013

A226380 Smallest of 101 consecutive primes whose sum is prime.

Original entry on oeis.org

83, 89, 139, 179, 181, 277, 281, 353, 409, 479, 499, 521, 571, 587, 643, 727, 839, 883, 887, 919, 929, 971, 977, 1019, 1021, 1117, 1213, 1223, 1237, 1259, 1303, 1327, 1367, 1381, 1399, 1423, 1433, 1481, 1483, 1667, 1723, 1789, 1823, 1861, 1879, 1913, 2083
Offset: 1

Views

Author

Harvey P. Dale, Jun 05 2013

Keywords

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[500]],101,1],PrimeQ[Total[#]]&]] [[1]]
    Prime[Select[Range[400], PrimeQ[Sum[Prime[# + i], {i, 0, 100}]] &]] (* Bruno Berselli, Aug 21 2013 *)

A189571 Smallest of nine consecutive primes whose sum is a prime.

Original entry on oeis.org

3, 29, 31, 37, 47, 79, 83, 89, 107, 109, 127, 131, 139, 149, 157, 173, 179, 193, 197, 199, 211, 241, 277, 347, 359, 367, 373, 389, 397, 433, 449, 487, 491, 521, 577, 593, 619, 643, 659, 677, 743, 761, 829, 853, 953, 977, 1049, 1063, 1087, 1129, 1151, 1193
Offset: 1

Views

Author

Bruno Berselli, Apr 23 2011

Keywords

Comments

First 7-tuple of consecutive primes belonging to the sequence: 118061, 118081, 118093, 118127, 118147, 118163, 118169. Twin primes in the sequence: 29, 31; 107, 109; 197, 199; 1427, 1429; 1607, 1609; 1721, 1723; 4019, 4021, etc. [Bruno Berselli, Aug 26 2013]

Examples

			47 is in the sequence because 47+53+59+61+67+71+73+79+83 = 593 and 593 is prime.
		

Crossrefs

Programs

  • Magma
    [ NthPrime(n): n in [1..190] | IsPrime(&+[NthPrime(n+s): s in [0..8]]) ];
    
  • Mathematica
    Transpose[Select[Partition[Prime[Range[500]],9,1],PrimeQ[Total[#]]&]] [[1]] (* Harvey P. Dale, Jun 05 2013 *)
  • Python
    from sympy import isprime, nextprime
    def aupto(limit):
      plst, alst = [3, 5, 7, 11, 13, 17, 19, 23, 29], []
      while plst[0] <= limit:
        if isprime(sum(plst)): alst.append(plst[0])
        plst = plst[1:] + [nextprime(plst[-1])]
      return alst
    print(aupto(1200)) # Michael S. Branicky, Mar 29 2021

Extensions

Additional cross reference from Harvey P. Dale, Jun 05 2013

A152470 Largest of three consecutive primes whose sum is a prime.

Original entry on oeis.org

11, 13, 17, 23, 29, 31, 37, 41, 47, 61, 71, 73, 79, 89, 97, 107, 127, 151, 157, 167, 173, 211, 227, 239, 281, 293, 307, 311, 317, 349, 353, 359, 389, 401, 419, 421, 439, 461, 463, 479, 487, 503, 509, 523, 563, 631, 647, 661, 673, 677, 719, 733, 757, 761, 769
Offset: 1

Views

Author

Keywords

Examples

			3+5+7 = 15 is composite.
5+7+11 = 23 is prime and (5, 7, 11) are consecutive primes so a(1) = 11.
		

Crossrefs

Programs

  • Maple
    Primes:= select(isprime,[2,(2*i+1 $ i=1..10000)]):
    Primes[select(t -> isprime(Primes[t-2]+Primes[t-1]+Primes[t]),[$3..nops(Primes)])];
    # Robert Israel, Aug 29 2014
  • Mathematica
    lst={};Do[p0=Prime[n];p1=Prime[n+1];p2=Prime[n+2];If[PrimeQ[p0+p1+p2],AppendTo[lst,p2]],{n,6!}];lst
  • PARI
    s=[]; for(n=1, 1000, if(isprime(prime(n)+prime(n+1)+prime(n+2)), s=concat(s, prime(n+2)))); s \\ Colin Barker, Aug 25 2014

A152469 Second smallest of three consecutive primes whose sum is a prime.

Original entry on oeis.org

7, 11, 13, 19, 23, 29, 31, 37, 43, 59, 67, 71, 73, 83, 89, 103, 113, 149, 151, 163, 167, 199, 223, 233, 277, 283, 293, 307, 313, 347, 349, 353, 383, 397, 409, 419, 433, 457, 461, 467, 479, 499, 503, 521, 557, 619, 643, 659, 661, 673, 709, 727, 751, 757, 761
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    t0:=[];
    t1:=[];
    t2:=[];
    t3:=[];
    for i from 1 to 1000 do
    t3:=ithprime(i)+ithprime(i+1)+ithprime(i+2);
    if isprime(t3) then
    t0:=[op(t0),i];
    t1:=[op(t1),ithprime(i)];
    t2:=[op(t2),ithprime(i+1)];
    t3:=[op(t2),ithprime(i+2)];
    fi;
    od:
    t2;
  • Mathematica
    lst={};Do[p0=Prime[n];p1=Prime[n+1];p2=Prime[n+2];If[PrimeQ[p0+p1+p2],AppendTo[lst,p1]],{n,6!}];lst
    Select[Partition[Prime[Range[200]],3,1],PrimeQ[Total[#]]&][[All,2]] (* Harvey P. Dale, May 08 2021 *)

A182121 Primes p such that the sum of both three and five consecutive primes starting with p is prime.

Original entry on oeis.org

5, 7, 11, 19, 29, 31, 53, 67, 79, 109, 149, 157, 163, 211, 229, 311, 349, 379, 401, 409, 449, 467, 653, 757, 809, 839, 857, 863, 883, 983, 997, 1033, 1087, 1103, 1187, 1193, 1289, 1301, 1303, 1409, 1481, 1523, 1553, 1637, 1663, 1669, 1709, 1951, 1973
Offset: 1

Views

Author

Zak Seidov, Dec 17 2012

Keywords

Examples

			5 is in the sequence because 5 + 7 + 11 = 23 is prime and 5 + 7 + 11 + 13 + 17 = 53 is also prime.
		

Crossrefs

Intersection of A073681 and A152468.

Programs

  • Mathematica
    cpQ[n_]:=Module[{ppi=PrimePi[n],cnsc},cnsc=Prime[Range[ppi,ppi+4]];And@@ PrimeQ[ {Total[cnsc],Total[Take[cnsc,3]]}]]; Select[Prime[Range[300]],cpQ] (* Harvey P. Dale, Mar 28 2013 *)
    Select[Partition[Prime[Range[500]],5,1],AllTrue[{Total[Take[#,3]],Total[#]},PrimeQ]&][[;;,1]] (* Harvey P. Dale, Feb 11 2024 *)
  • PARI
    {a=2;b=3;c=5;d=7;e=11;for(n=1,300,s=a+b+c+d+e;
    if(isprime(s)&&isprime(a+b+c),print1(a","));a=b;b=c;c=d;d=e;e=nextprime(e+2))}
Showing 1-10 of 17 results. Next