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

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

A034965 Primes that are sum of five consecutive primes.

Original entry on oeis.org

53, 67, 83, 101, 139, 181, 199, 263, 311, 331, 373, 421, 449, 587, 617, 647, 683, 733, 787, 811, 839, 863, 941, 991, 1123, 1151, 1193, 1361, 1381, 1579, 1609, 1801, 1831, 1861, 1949, 1979, 2081, 2113, 2143, 2221, 2273, 2297, 2357, 2423, 2459, 2689, 2731
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Examples

			53 = 5 + 7 + 11 + 13 + 17.
373 = 67 + 71 + 73 + 79 + 83.
		

Crossrefs

Cf. A001043, A011974, A034707, A152468. Also Cf. A034964, of which this sequence is a subset.

Programs

  • Maple
    ts_prod_n:=proc(n) local i,ans; ans:=[ ]: for i from 1 to n do if isprime(ithprime(i)+ithprime(i+1)+ithprime(i+2)+ithprime(i+3)+ithprime(i+4))= 'true' then ans:=[op(ans), ithprime(i)+ithprime(i+1)+ithprime(i+2)+ithprime(i+3)+ithprime(i+4) ]: fi od: end: ts_prod_n(701); # Jani Melik, May 05 2006
  • Mathematica
    Select[Table[Plus@@Prime[Range[n, n + 4]], {n, 200}], PrimeQ] (* Alonso del Arte, Dec 30 2011 *)
    Select[Total/@Partition[Prime[Range[200]],5,1],PrimeQ] (* Harvey P. Dale, May 24 2012 *)

Extensions

Corrected example by Paul S. Coombes, Dec 29 2011

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))}

A211170 Primes that are sum of both three and five consecutive primes.

Original entry on oeis.org

83, 199, 311, 941, 1151, 1381, 2357, 3121, 4337, 4363, 4957, 5059, 7039, 8069, 8117, 8161, 8389, 8627, 8819, 8971, 9011, 9349, 10211, 10253, 13127, 14813, 16249, 19207, 19717, 21377, 23143, 24329, 32983, 34807, 38113, 39623, 41141, 44279, 45061, 45979, 58403
Offset: 1

Views

Author

Zak Seidov, Jan 31 2013

Keywords

Comments

Intersection of A034962 and A034965.

Examples

			a(1) = 83 = A034962(6) = 23 + 29 + 31 = A034965(3) = 11 + 13 + 17 + 19 + 23.
		

Crossrefs

Programs

  • Mathematica
    Module[{prs=Prime[Range[3000]],pr3,pr5},pr3=Select[Total/@Partition[ prs, 3, 1], PrimeQ];pr5=Select[Total/@Partition[prs,5,1],PrimeQ];Intersection[ pr3,pr5]] (* Harvey P. Dale, Oct 24 2016 *)
Showing 1-10 of 13 results. Next