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-8 of 8 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

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

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

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

A089793 a(n) = the first prime in the earliest chain of 2n+1 consecutive primes whose sum is prime.

Original entry on oeis.org

2, 5, 5, 17, 3, 5, 29, 3, 3, 11, 7, 7, 5, 7, 13, 13, 7, 5, 5, 13, 7, 7, 7, 7, 11, 17, 3, 3, 97, 29, 3, 13, 3, 19, 19, 3, 5, 3, 23, 7, 11, 53, 31, 89, 53, 19, 11, 3, 17, 23, 83, 11, 5, 47, 37, 5, 17, 3, 3, 29, 23, 5, 5, 5, 59, 7, 7, 31, 3, 67, 3, 3, 89, 71, 31
Offset: 0

Views

Author

Joseph L. Pe, Jan 09 2004

Keywords

Comments

In general (except possibly when it begins with 2), the sum of an even number of consecutive primes is even - hence the restriction to odd chain lengths.

Examples

			17 is the first prime in the chain 17, 19, 23, 29, 31, 37, 41, which is the earliest chain of 2 * 3 + 1 = 7 consecutive primes whose sum, 197, is prime. Hence a(3) = 17.
		

Crossrefs

Programs

  • Mathematica
    With[{prs=Prime[Range[1000]]},First[#]&/@Flatten[Table[Select[ Partition[ prs,2n+1,1],PrimeQ[Total[#]]&,1],{n,0,80}],1]] (* Harvey P. Dale, Jun 21 2013 *)

A228201 Smallest of 11 consecutive primes whose sum is not a prime.

Original entry on oeis.org

2, 3, 17, 29, 31, 43, 47, 53, 61, 67, 71, 73, 79, 83, 89, 97, 127, 131, 139, 163, 179, 181, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 271, 277, 311, 313, 317, 337, 347, 367, 373, 379, 383, 389, 397, 401, 409, 419, 433, 439, 443, 449
Offset: 1

Views

Author

Vincenzo Librandi, Aug 20 2013

Keywords

Examples

			31 is in the sequence because 31+37+41+43+47+53+59+61+67+71+73 = 583 and 583 = 11*53.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..120] |not IsPrime(&+[NthPrime(n+s): s in [0..10]])];
  • Mathematica
    Transpose[Select[Partition[Prime[Range[150]], 11, 1], ! PrimeQ[Total[#]] &]][[1]]
    Prime[Select[Range[100], ! PrimeQ[Sum[Prime[# + i], {i, 0, 10}]] &]] (* 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-8 of 8 results.