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-9 of 9 results.

A073681 Smallest of three consecutive primes whose sum is a prime.

Original entry on oeis.org

5, 7, 11, 17, 19, 23, 29, 31, 41, 53, 61, 67, 71, 79, 83, 101, 109, 139, 149, 157, 163, 197, 211, 229, 271, 281, 283, 293, 311, 337, 347, 349, 379, 389, 401, 409, 431, 449, 457, 463, 467, 491, 499, 509, 547, 617, 641, 653, 659, 661, 701, 719, 743, 751, 757
Offset: 1

Views

Author

Amarnath Murthy, Aug 11 2002

Keywords

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [0..200] | IsPrime(NthPrime(n)+NthPrime(n+1)+ NthPrime(n+2))]; // Vincenzo Librandi, May 06 2015
  • Maple
    t0:=[];
    t1:=[];
    t2:=[];
    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+2)];
    fi;
    od:
    t1;
  • Mathematica
    Transpose[Select[Partition[Prime[Range[200]],3,1],PrimeQ[Total[#]]&]] [[1]] (* Harvey P. Dale, Jan 25 2012 *)
  • PARI
    forprime(p=1,1000, pp=nextprime(p+1); if(isprime(p+pp+nextprime(pp+1)),print1(p",")))
    
  • PARI
    A073681(n,print_all=0,start=3)={my(r,q=1);forprime(p=start,, isprime(r+(r=q)+(q=p)) & (n-- ||return(precprime(r-1))) & print_all & print1(precprime(r-1)","))} \\ M. F. Hasler, Dec 18 2012
    

Formula

Conjecture: for n -> oo, a(n) ~ prime(n) * (log(prime(n)))^C, where C = 8/Pi^2 (cf. A217739). - Alain Rocchelli, Sep 04 2023

Extensions

More terms from Ralf Stephan, Mar 20 2003
More cross-references from Harvey P. Dale, Jun 05 2013

A082246 Primes that are the sum of 7 consecutive primes.

Original entry on oeis.org

197, 223, 251, 281, 311, 401, 431, 463, 523, 593, 659, 719, 757, 827, 863, 947, 991, 1063, 1171, 1753, 1901, 2347, 2393, 2647, 2689, 2731, 2777, 2819, 2953, 3347, 3389, 3533, 3643, 3701, 3761, 3821, 4177, 4217, 4451, 4493, 5507, 5717, 5849, 5927, 6029
Offset: 1

Views

Author

Cino Hilliard, May 09 2003

Keywords

Examples

			2 + 3 + 5 + 7 + 11 + 13 + 17 = 58 = 2*29
3 + 5 + 7 + 11 + 13 + 17 + 19 = 75 = 3*5^2
5 + 7 + 11 + 13 + 17 + 19 + 23 = 95 = 5*19
7 + 11 + 13 + 17 + 19 + 23 + 29 = 119 = 7*17
11 + 13 + 17 + 19 + 23 + 29 + 31 = 143 = 11*13
13 + 17 + 19 + 23 + 29 + 31 + 37 = 169 = 13*13
17 + 19 + 23 + 29 + 31 + 37 + 41 = 197 (prime)
		

Crossrefs

Cf. A180948.

Programs

  • Maple
    Primes:= select(isprime, [seq(i,i=3..10000,2)]):
    S:= ListTools:-PartialSums(Primes):
    select(isprime,S[8..-1]-S[1..-8]); # Robert Israel, Dec 14 2017
  • Mathematica
    Select[ListConvolve[{1,1,1,1,1,1,1},Prime[Range[200]]],PrimeQ] (* Harvey P. Dale, Jul 12 2013 *)
    Select[Total/@Partition[Prime[Range[200]],7,1],PrimeQ] (* Harvey P. Dale, Jul 24 2017 *)
  • PARI
    \\ primes in the sum of m odd number of consecutive primes. m=7
    psumprm(m,n) = { sr=0; s=0; for(j=1,m, s+=prime(j); ); for(x=1,n, s = s - prime(x)+ prime(x+m); if(isprime(s),sr+=1.0/s; print1(s" ")); ); print(); print(sr) }

Extensions

Corrected by Michael Somos, Feb 01 2004

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

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

A370139 Primes p such that the sums of three, five, and seven consecutive primes starting with p are prime.

Original entry on oeis.org

19, 29, 31, 53, 79, 379, 401, 839, 883, 1301, 1409, 1951, 1973, 2113, 2683, 2791, 2833, 3407, 3613, 3793, 3823, 4441, 4751, 4831, 5623, 5827, 6133, 6329, 7187, 7237, 7703, 8527, 9173, 10103, 10853, 11317, 12277, 13163, 13933, 14159, 14827, 15241, 15667
Offset: 1

Views

Author

Harvey P. Dale, Feb 11 2024

Keywords

Examples

			379 is in the sequence because the seven consecutive primes starting with 379 are 379, 383, 389, 397, 401, 409, and 419, and (379+383+389)=1151, and (379+383+389+397+401)=1949, and (379+383+389+397+401+409+419)=2777, and 1151 and 1949 and 2777 are all primes.
		

Crossrefs

Intersection of A180948 and A182121.

Programs

  • Mathematica
    Select[Partition[Prime[Range[5000]],7,1],AllTrue[{Total[Take[#,3]],Total[Take[#,5]],Total[#]},PrimeQ]&][[;;,1]]

A228199 Smallest of 7 consecutive primes whose sum is not a prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 37, 41, 59, 67, 73, 83, 101, 109, 131, 139, 149, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 239, 241, 251, 263, 269, 271, 277, 281, 283, 293, 307, 311, 331, 337, 347, 349, 353, 389, 397, 409, 419, 421, 431, 433, 439, 443
Offset: 1

Views

Author

Vincenzo Librandi, Aug 20 2013

Keywords

Examples

			59 is in the sequence because 59+61+67+71+73+79+83 = 493 and 493 is not a prime.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..120] |not IsPrime(&+[NthPrime(n+s): s in [0..6]])];
  • Mathematica
    Transpose[Select[Partition[Prime[Range[150]], 7, 1], ! PrimeQ[Total[#]] &]][[1]]
    Prime[Select[Range[100], ! PrimeQ[Sum[Prime[# + i], {i, 0, 6}]] &]] (* Bruno Berselli, Aug 22 2013 *)

A229059 Smallest of 13 consecutive primes whose sum is a prime.

Original entry on oeis.org

29, 41, 47, 61, 71, 89, 97, 103, 107, 131, 139, 149, 193, 211, 241, 263, 277, 293, 311, 313, 349, 353, 379, 383, 397, 401, 419, 443, 461, 491, 521, 557, 593, 599, 631, 647, 677, 739, 761, 809, 827, 877, 983, 1013, 1039, 1061, 1109, 1117, 1171, 1193, 1201
Offset: 1

Views

Author

Vincenzo Librandi, Sep 13 2013

Keywords

Examples

			a(1)=29 since 29+31+37+41+43+47+53+59+61+67+71+73+79=691 is a prime.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..200] | IsPrime(&+[NthPrime(n+s): s in [0..12]])];
  • Mathematica
    Transpose[Select[Partition[Prime[Range[250]], 13, 1], PrimeQ[Total[#]]&]][[1]]
Showing 1-9 of 9 results.