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

A207527 Primes that are the sum of three consecutive primes in A034962.

Original entry on oeis.org

131, 251, 337, 503, 743, 929, 1447, 1597, 3023, 3919, 4051, 4157, 5087, 5897, 6133, 7649, 7877, 8269, 9181, 9433, 9721, 11411, 11677, 13151, 13757, 14009, 14533, 18133, 18493, 18743, 20563, 21023, 21247, 22651, 22921, 23057, 23801, 23893, 24359, 24733, 24809
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A034962.

Programs

  • Mathematica
    t = Select[Table[Prime[n] + Prime[n + 1] + Prime[n + 2], {n, 1000}], PrimeQ]; Select[Table[t[[n]] + t[[n + 1]] + t[[n + 2]], {n, Length[t] - 2}], PrimeQ]

A117714 a(n) = (A034962(n) - A152470(n))/2.

Original entry on oeis.org

6, 9, 12, 18, 21, 26, 30, 34, 42, 56, 64, 69, 72, 81, 86, 102, 111, 144, 150, 160, 165, 198, 217, 231, 274, 282, 288, 300, 312, 342, 348, 351, 381, 393, 405, 414, 432, 453, 459, 465, 473, 495, 501, 515
Offset: 1

Views

Author

Roger L. Bagula, Apr 13 2006

Keywords

Comments

The sequence is always increasing.

Crossrefs

Programs

  • Mathematica
    a = Flatten[Table[If[PrimeQ[Prime[n] + Prime[n + 1] + Prime[n + 2]] == True, If [Prime[n] + Prime[n + 1] + Prime[n + 2] - Prime[m] == 0, {( Prime[m] - Prime[n + 2])/2}, {}], {}], {n, 1, 100}, {m, 1, 500}]]

Extensions

Description simplified by the Assoc. Eds. of the OEIS, Jun 27 2010

A034961 Sums of three consecutive primes.

Original entry on oeis.org

10, 15, 23, 31, 41, 49, 59, 71, 83, 97, 109, 121, 131, 143, 159, 173, 187, 199, 211, 223, 235, 251, 269, 287, 301, 311, 319, 329, 349, 371, 395, 407, 425, 439, 457, 471, 487, 503, 519, 533, 551, 565, 581, 589, 607, 633, 661, 679, 689, 701, 713, 731, 749, 771
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Comments

For prime terms see A034962. - Zak Seidov, Feb 17 2011

Examples

			a(1) = 10 = 2 + 3 + 5.
a(42) = 565 = 181 + 191 + 193.
		

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..2] ]: n in [1..50] ]; // Vincenzo Librandi, Apr 03 2011
    
  • Mathematica
    Plus @@@ Partition[ Prime[ Range[60]], 3, 1] (* Robert G. Wilson v, Feb 11 2005 *)
    3 MovingAverage[Prime[Range[60]], {1, 1, 1}] (* Jean-François Alcover, Nov 12 2018 *)
  • PARI
    a(n)=my(p=prime(n),q=nextprime(p+1)); p+q+nextprime(q+1) \\ Charles R Greathouse IV, Jul 01 2013
    
  • PARI
    is(n)=my(p=precprime(n\3),q=nextprime(n\3+1),r=n-p-q); if(r>q, r==nextprime(q+2), r==precprime(p-1) && r) \\ Charles R Greathouse IV, Jul 05 2017
    
  • Python
    from sympy import nextprime
    from itertools import count, islice
    def agen(): # generator of terms
        p, q, r = 2, 3, 5
        while True:
            yield p + q + r
            p, q, r = q, r, nextprime(r)
    print(list(islice(agen(), 54))) # Michael S. Branicky, Dec 27 2022
  • Sage
    BB = primes_first_n(57)
    L = []
    for i in range(55):
        L.append(BB[i]+BB[i+1]+BB[i+2])
    L # Zerinvary Lajos, May 14 2007
    

Formula

a(n) = Sum_{k=0..2} A000040(n+k). - Omar E. Pol, Feb 28 2020
a(n) = A001043(n) + A000040(n+2). - R. J. Mathar, May 25 2020

A215991 Primes that are the sum of 25 consecutive primes.

Original entry on oeis.org

1259, 1361, 2027, 2267, 2633, 3137, 3389, 4057, 5153, 6257, 6553, 7013, 7451, 7901, 9907, 10499, 10799, 10949, 11579, 12401, 14369, 15013, 15329, 17377, 17903, 18251, 18427, 19309, 22441, 24023, 25057, 25229, 26041, 26699, 28111, 29017, 29207, 30707, 32939, 35051, 36583
Offset: 1

Views

Author

Syed Iddi Hasan, Aug 30 2012

Keywords

Comments

Such sequences already existed for all odd numbers <= 15. I chose the particular points (in A215991-A216020) so that by referring to a particular n-th term of one of these sequences, the expected range of the n-th term of an x-prime sum can be calculated for any odd x<100000.

Crossrefs

Programs

  • GAP
    P:=Filtered([1..10^4],IsPrime);;
    Filtered(List([0..250],k->Sum([1..25],i->P[i+k])),IsPrime); # Muniru A Asiru, Feb 11 2018
  • Maple
    select(isprime, [seq(add(ithprime(i+k), i=1..25), k=0..250)]); # Muniru A Asiru, Feb 11 2018
  • Mathematica
    Select[ListConvolve[Table[1, 25], Prime[Range[500]]], PrimeQ] (* Jean-François Alcover, Jul 01 2018, after Harvey P. Dale *)
    Select[Total/@Partition[Prime[Range[300]],25,1],PrimeQ] (* Harvey P. Dale, Mar 04 2023 *)
  • PARI
    psumprm(m, n)={my(list=List(), s=sum(j=1,m,prime(j)), i=1); while(#listAndrew Howroyd, Feb 11 2018
    

A070934 Smallest prime equal to the sum of 2n+1 consecutive primes.

Original entry on oeis.org

2, 23, 53, 197, 127, 233, 691, 379, 499, 857, 953, 1151, 1259, 1583, 2099, 2399, 2417, 2579, 2909, 3803, 3821, 4217, 4651, 5107, 5813, 6829, 6079, 6599, 14153, 10091, 8273, 10163, 9521, 12281, 13043, 11597, 12713, 13099, 16763, 15527, 16823, 22741
Offset: 0

Views

Author

Lekraj Beedassy, May 21 2002

Keywords

Examples

			Every term of the increasing sequence of primes 127, 401, 439, 479, 593,... is splittable into a sum of 9 consecutive odd primes and 127 = 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 is the least one corresponding to n = 4.
		

Crossrefs

Cf. Bisection of A070281.
See A082244 for another version.

Programs

  • Mathematica
    f[n_] := Block[{k = 1, s},While[s = Sum[Prime[i], {i, k, k + 2n}]; !PrimeQ[s], k++ ]; s]; Table[f[n], {n, 0, 41}] (* Ray Chandler, Sep 27 2006 *)

Extensions

Corrected and extended by Ray G. Opao, Aug 26 2004
Entry revised by Ray Chandler, Sep 27 2006

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

A127340 Primes that are the sum of 11 consecutive primes.

Original entry on oeis.org

233, 271, 311, 353, 443, 491, 631, 677, 883, 1367, 1423, 1483, 1543, 1607, 1787, 1901, 1951, 2011, 2141, 2203, 2383, 3253, 3469, 3541, 3617, 3691, 3967, 4159, 4229, 4297, 4943, 5009, 5483, 5657, 5741, 5903, 5981, 6553, 6871, 6991, 7057, 7121, 7187, 7873
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

Primes in A127338.
A prime number n is in the sequence if for some k it is the absolute value of coefficient of x^10 of the polynomial Prod_{j=0,10}(x-prime(k+j)); the roots of this polynomial are prime(k), ..., prime(k+10).

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[Sum[Prime[x + n], {n, 0, 10}]], AppendTo[a, Sum[Prime[x + n], {n, 0, 10}]]], {x, 1, 500}]; a
    Select[Total/@Partition[Prime[Range[200]],11,1],PrimeQ] (* Harvey P. Dale, Jul 16 2012 *)
  • PARI
    {m=125;k=11;for(n=0,m-1,a=sum(j=1,k,prime(n+j));if(isprime(a),print1(a,",")))} \\ Klaus Brockhaus, Jan 13 2007
    
  • PARI
    {m=126;k=11;for(n=1,m,a=abs(polcoeff(prod(j=0,k-1,(x-prime(n+j))),k-1));if(isprime(a),print1(a,",")))} \\ Klaus Brockhaus, Jan 13 2007

Extensions

Edited by Klaus Brockhaus, Jan 13 2007

A127341 Primes that can be written as the sum of 13 consecutive primes.

Original entry on oeis.org

691, 863, 983, 1153, 1283, 1553, 1621, 1753, 1823, 2111, 2239, 2311, 2963, 3191, 3617, 3853, 4099, 4357, 4519, 4597, 4999, 5081, 5393, 5471, 5623, 5693, 5849, 6229, 6491, 6971, 7349, 7673, 8123, 8191, 8669, 8933, 9391, 10141, 10499, 10949, 11273
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Examples

			691 = prime(10) + prime(11) + ... + prime(22) = 29 + 31 + ... + 79.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[Sum[Prime[i], {i, n, n + 12}], {n, 1, 150}], PrimeQ[ # ] &]
    Select[Total/@Partition[Prime[Range[200]],13,1],PrimeQ] (* Harvey P. Dale, Aug 13 2021 *)

Extensions

Edited by Stefan Steinerberger, Jul 31 2007

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

A127346 Primes in A127345.

Original entry on oeis.org

31, 71, 167, 311, 1151, 3119, 4871, 5711, 6791, 14831, 24071, 33911, 60167, 79031, 101159, 106367, 115631, 158231, 235751, 259751, 366791, 402551, 455471, 565919, 635711, 644951, 1124831, 1347971, 1510799, 1547927, 1743419, 1851671, 2048471
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

Primes of the form prime(k)*prime(k+1) + prime(k)*prime(k+2) + prime(k+1)*prime(k+2).
A prime number n is in the sequence if for some k it is the coefficient of x^1 of the polynomial Product_{j=0..2} (x-prime(k+j)); the roots of this polynomial are prime(k), ..., prime(k+2).

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[If[PrimeQ[Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x + 1] Prime[x + 2]], AppendTo[a, Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x + 1] Prime[x + 2]], AppendTo[b, Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x + 1] Prime[x + 2]]], {x, 1, 100}]; Print[a] (* Artur Jasinski, Jan 11 2007 *)
    s[li_] := li[[1]]*(li[[2]]+li[[3]])+li[[2]]*li[[3]]; Select[(s[#]&/@Partition[Prime[Range[100]], 3, 1]), PrimeQ] (* Zak Seidov, Jan 13 2012 *)
  • PARI
    {m=143;k=2;for(n=1,m,a=sum(i=n,n+k-1,sum(j=i+1,n+k,prime(i)*prime(j)));if(isprime(a),print1(a,",")))} \\ Klaus Brockhaus, Jan 21 2007
    
  • PARI
    {m=143;k=2;for(n=1,m,a=polcoeff(prod(j=0,k,(x-prime(n+j))),1);if(isprime(a),print1(a,",")))} \\ Klaus Brockhaus, Jan 21 2007
    
  • PARI
    p=2; q=3; forprime(r=5, 1e3, if(isprime(t=p*q+p*r+q*r), print1(t", ")); p=q; q=r) \\ Charles R Greathouse IV, Jan 13 2012

Formula

a(n) = A127345(A204231(n)). - Zak Seidov, Jan 13 2012

Extensions

Edited and extended by Klaus Brockhaus, Jan 21 2007
Showing 1-10 of 40 results. Next