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

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

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

A372627 Array read by antidiagonals. Row m consists of numbers k such that the sum of 2*m-1 primes starting at prime(k) is prime.

Original entry on oeis.org

1, 2, 3, 3, 4, 3, 4, 5, 4, 7, 5, 7, 5, 8, 2, 6, 8, 6, 9, 10, 3, 7, 9, 8, 10, 11, 4, 10, 8, 10, 10, 11, 12, 5, 13, 2, 9, 11, 11, 14, 15, 6, 15, 4, 2, 10, 13, 14, 15, 22, 8, 18, 8, 3, 5, 11, 16, 16, 16, 23, 9, 20, 9, 9, 7, 4, 12, 18, 17, 18, 24, 12, 24, 10, 10, 8, 7, 4, 13, 19, 19, 20, 28, 13, 25
Offset: 1

Views

Author

Zak Seidov and Robert Israel, May 07 2024

Keywords

Examples

			Array starts
 1   2   3   4   5   6   7   8   9  10
 3   4   5   7   8   9  10  11  13  16
 3   4   5   6   8  10  11  14  16  17
 7   8   9  10  11  14  15  16  18  20
 2  10  11  12  15  22  23  24  28  29
 3   4   5   6   8   9  12  13  17  26
10  13  15  18  20  24  25  27  28  32
 2   4   8   9  10  19  20  21  24  25
 2   3   9  10  13  15  16  17  24  27
 5   7   8   9  12  13  14  18  19  20
T(3,3) = 5 is a term because the sum of the 2*3 - 1 = 5 primes starting at prime(5) = 11 is 11 + 13 + 17 + 19 + 23 = 83, which is prime.
		

Crossrefs

Cf. A215235 (1st column).

Programs

  • Maple
    P:= select(isprime,[2,seq(i,i=3..10^6,2)]):
    SP:= ListTools:-PartialSums(P):
    A:= Matrix(20,20): A[1,1]:= 1:
    for m from 1 to 20 do
      if m = 1 then count:= 1 else count:= 0 fi;
      for k from 1 while count < 20 do
        if isprime(SP[k+2*m-1]-SP[k]) then
          count:= count+1; A[m,count]:= k+1 fi
    od od:
    [seq(seq(A[i,m-i],i=1..m-1),m=2..21)];
Showing 1-3 of 3 results.