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.

Previous Showing 11-18 of 18 results.

A075675 Sum of next n even interprimes.

Original entry on oeis.org

4, 18, 74, 182, 358, 746, 1176, 1854, 2650, 3870, 5696, 7358, 9818, 13052, 16134, 19742, 24192, 30048, 36306, 42932, 50954, 59904, 70210, 82646, 93446, 105640, 117558, 131950, 148108, 165772
Offset: 1

Views

Author

Zak Seidov, Sep 24 2002

Keywords

Comments

Sum of next n primes in A007468. Sum of next n integer interprimes in A075673. Sum of next n odd interprimes in A075674.

Examples

			a(1) = (3+5)/2 = 4; a(2) = (5+7)/2+(11+13)/2 = 6 + 12 = 18.
		

Crossrefs

Programs

  • Mathematica
    ev=Select[Table[(Prime[i]+Prime[i+1])/2, {i, 2, 2000}], EvenQ]; (* sum of next n even interprimes*) i1 := n(n-1)/2+1; i2 := n(n-1)/2+n; A075675=Table[Sum[ev[[i]], {i, i1, i2}], {n, 30}]
    Module[{nn=1000,ip,len},ip=Select[Mean/@Partition[Prime[Range[nn]],2,1],EvenQ];len=Length[ip];Total/@TakeList[ip,Range[(Sqrt[1+8*len]-1)/2]]] (* Requires Mathematica version 11 or later *) (* Harvey P. Dale, Jun 30 2020 *)

A161463 Sum of all primes from n-th prime to (2*n-1)-th prime.

Original entry on oeis.org

2, 8, 23, 48, 83, 132, 197, 270, 363, 468, 583, 714, 863, 1026, 1199, 1392, 1607, 1836, 2083, 2346, 2627, 2926, 3237, 3564, 3925, 4290, 4669, 5074, 5499, 5938, 6389, 6862, 7355, 7866, 8411, 8964, 9539, 10134, 10743, 11374, 12029, 12702, 13393, 14094
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 10 2009

Keywords

Comments

From Lekraj Beedassy, Apr 30 2010: (Start)
Sum of next n primes starting with the n-th prime.
For sum of next n primes starting with the (T(n) + 1)-th prime, or A000124(n)-th prime = A078721(n), {T(n)=A000217(n)}, see A007468(n). (End)
74 of the first 1000 terms of this sequence are primes and each occurs at an odd index. - Harvey P. Dale, Jan 12 2014

Examples

			Sum of 3rd prime to 5th prime = 5+7+11, hence a(3) = 23; sum of 4th prime to 7th prime = 7+11+13+17, hence a(4) = 48.
		

Crossrefs

Cf. A000040 (primes), A007504 (sum of first n primes), A105720 (sum of n-th and next n primes).

Programs

  • Magma
    [ &+[ NthPrime(k): k in [n..2*n-1] ]: n in [1..44] ]; // Klaus Brockhaus, Jun 12 2009
  • Mathematica
    nn=100;With[{prs=Prime[Range[nn]]},Table[Total[Take[prs,{n,2n-1}]],{n, Floor[(nn+1)/2]}]] (* Harvey P. Dale, Jan 12 2014 *)

Extensions

Edited, corrected and extended by Klaus Brockhaus, Jun 12 2009

A199714 A puzzle by Ron Hoeflin.

Original entry on oeis.org

0, 9, 23, 30, 35, 49, 58, 73, 94, 113
Offset: 1

Views

Author

N. J. A. Sloane, Nov 09 2011

Keywords

Comments

In November 1987, an editor at the Astrophysical Journal wrote to N. J. A. Sloane with three sequences whose explanation was not known to her. She said: "As to the pedigree of these sequences, not much is known. But they are US in origin, and /not/ Hungarian". One of the three was the number-theoretical sequence A007468. The other two are now A199714 and A199715.
Looking at the first differences (9, 14, 7, 5, 14, 9, 15, 21), one may notice that the last three terms are 3*(3, 5, 7), and the relation 9 = 14 - 5 seems to appear twice. Taking the second differences yields (5, -7, -2, 9, -5, 6, 6), where similar relations 5 - 7 = -2 and 7 + 2 = 9 can be seen. - M. F. Hasler, Mar 14 2018
This puzzle occurs on a trial test by Ron Hoeflin for his Titan Test. It is question 13 on Trial Test F. Link is below. The sequence differences are the alphabetical positions (a is 1, b is 2, etc.) of the letters in the word "ingenious." Since s is 19, the next term is 94 + 19 = 113. Then the sequence ends. - Chris Cole, Mar 03 2023

Extensions

a(10) from Chris Cole, Mar 03 2023

A125130 Successive sums of consecutive primes that form a triangular grid.

Original entry on oeis.org

2, 10, 41, 129, 328, 712, 1371, 2427, 4028, 6338, 9523, 13887, 19580, 26940, 36227, 47721, 61910, 79168, 99685, 124211, 153178, 186914, 225831, 271061, 322858, 382038, 448869, 524451, 608914, 704204, 810459, 927883, 1057828, 1201162
Offset: 1

Views

Author

Cino Hilliard, Jan 10 2007

Keywords

Examples

			The consecutive primes 2, 3, 5, 7, 11, 13 form the triangular grid
     2
   3  5
  7 11 13
These consecutive primes add up to 41, the third entry in the table.
		

Crossrefs

Partial sums of A007468.

Programs

  • Mathematica
    With[{nmax = 50}, Accumulate[Prime[Range[PolygonalNumber[nmax]]]][[PolygonalNumber[Range[nmax]]]]] (* Paolo Xausa, May 15 2025 *)
  • PARI
    a(n) = sum(x=1, n*(n+1)/2, prime(x))

Formula

a(n) ~ x^2/(2*log(x)-1), where x = prime(n*(n-1)/2+n). For n = 10000, the relative error is about 0.06%.
a(n) = A007504(A000217(n)). - Andrew Howroyd, Sep 28 2024

A199715 A puzzle - explanation is not known.

Original entry on oeis.org

2, 8, 2, 3, 4, 9, 4, 5, 9, 8
Offset: 1

Views

Author

N. J. A. Sloane, Nov 09 2011

Keywords

Comments

In November 1987, an editor at the Astrophysical Journal wrote to N. J. A. Sloane with three sequences whose explanation was not known to her. She said: "As to the pedigree of these sequences, not much is known. But they are US in origin, and /not/ Hungarian". One of the three was the number-theoretical sequence A007468. The other two are now A199714 and this sequence.
The synodic rotation period of the main-belt asteroid (6572) Carson, discovered 1938, is approximately 2.8235 hours. [Galad & Kornos] - Arkadiusz Wesolowski and Robert Israel, May 11 2018

Crossrefs

A249490 a(n) = Sum_{m=0..floor((n-1)/2)} prime((n-m)(n-m-1)/2+m+1).

Original entry on oeis.org

2, 3, 12, 28, 63, 113, 208, 296, 473, 657, 946, 1236, 1661, 2071, 2688, 3228, 4059, 4811, 5898, 6858, 8209, 9433, 11116, 12572, 14637, 16395, 18872, 21046, 23935, 26405, 29836, 32742, 36695, 40007, 44480, 48254, 53405, 57681, 63488, 68284, 74791, 80149, 87374
Offset: 1

Views

Author

George Stagg, Oct 30 2014

Keywords

Comments

Arrange the prime numbers into a triangle, with 2 at the top, 3 and 5 in the second row, 7, 11 and 13 in the third row, and so on:
2
3 5
7 11 13
17 19 23 29
31 37 41 43 47
...
The n-th term in the sequence is then the sum of the numbers in the upward diagonal beginning on the n-th row of this triangle.

Examples

			a(1) = 2; a(2) = 3; a(3) = 7+5 = 12; a(4) = 17+11 = 28.
		

Crossrefs

Programs

  • Maple
    A249490:=n->add(ithprime((n-m)*(n-m-1)/2+m+1), m=0..floor((n-1)/2)): seq(A249490(n), n=1..50); # Wesley Ivan Hurt, Nov 07 2014
  • Mathematica
    Table[Sum[Prime[(n - m) (n - m - 1)/2 + m + 1], {m, 0, Floor[(n - 1)/2]}], {n, 50}] (* Wesley Ivan Hurt, Nov 07 2014 *)
  • PARI
    a(n) = sum(m=0,(n-1)\2, prime((n-m)*(n-m-1)/2+m+1)); \\ Michel Marcus, Nov 04 2014

Formula

a(n) = Sum_{m=0..floor((n-1)/2)} prime((n-m)(n-m-1)/2+m+1).

A344482 Primes, each occurring twice, such that a(C(n)) = a(4*n-C(n)) = prime(n), where C is the Connell sequence (A001614).

Original entry on oeis.org

2, 3, 2, 5, 7, 3, 11, 5, 13, 17, 7, 19, 11, 23, 13, 29, 31, 17, 37, 19, 41, 23, 43, 29, 47, 53, 31, 59, 37, 61, 41, 67, 43, 71, 47, 73, 79, 53, 83, 59, 89, 61, 97, 67, 101, 71, 103, 73, 107, 109, 79, 113, 83, 127, 89, 131, 97, 137, 101, 139, 103, 149, 107, 151
Offset: 1

Views

Author

Paolo Xausa, Aug 16 2021

Keywords

Comments

Terms can be arranged in an irregular triangle read by rows in which row r is a permutation P of the primes in the interval [prime(s), prime(s+rlen-1)], where s = 1+(r-1)*(r-2)/2, rlen = 2*r-1 = A005408(r-1) and r >= 1 (see example).
P is the alternating (first term > second term < third term > fourth term < ...) permutation m -> 1, 1 -> 2, m+1 -> 3, 2 -> 4, m+2 -> 5, 3 -> 6, ..., rlen -> rlen where m = ceiling(rlen/2).
The triangle has the following properties.
Row lengths are the positive odd numbers (A005408).
First column is A078721.
Column 3 is A078722 (for n >= 1).
Column 5 is A078724 (for n >= 2).
Column 7 is A078725 (for n >= 3).
Each even column is equal to the column preceding it.
Row records (A011756) are in the right border.
Indices of row records are the positive terms of A000290.
Each row r contains r terms that are duplicated in the next row.
In each row, the sum of terms which are not already listed in the sequence give A007468.
For rows r >= 2, row sum is A007468(r)+A007468(r-1) and row product is A007467(r)*A007467(r-1).

Examples

			Written as an irregular triangle the sequence begins:
   2;
   3,   2,   5;
   7,   3,  11,   5,  13;
  17,   7,  19,  11,  23,  13,  29;
  31,  17,  37,  19,  41,  23,  43,  29,  47;
  53,  31,  59,  37,  61,  41,  67,  43,  71,  47,  73;
  79,  53,  83,  59,  89,  61,  97,  67, 101,  71, 103,  73, 107;
  ...
The triangle can be arranged as shown below so that, in every row, each odd position term is equal to the term immediately below it.
                2
             3  2  5
          7  3 11  5 13
      17  7 19 11 23 13 29
   31 17 37 19 41 23 43 29 47
              ...
		

Crossrefs

Programs

  • Mathematica
    nterms=64;a=ConstantArray[0,nterms];For[n=1;p=1,n<=nterms,n++,If[a[[n]]==0,a[[n]]=Prime[p];If[(d=4p-n)<=nterms,a[[d]]=a[[n]]];p++]]; a
    (* Second program, triangle rows *)
    nrows=8;Table[rlen=2r-1;Permute[Prime[Range[s=1+(r-1)(r-2)/2,s+rlen-1]],Join[Range[2,rlen,2],Range[1,rlen,2]]],{r,nrows}]

Formula

a(A001614(n)) = a(4*n-A001614(n)) = prime(n).

A038345 Sum of the next n members of the list of twin primes.

Original entry on oeis.org

3, 12, 41, 120, 307, 696, 1241, 1956, 3307, 5544, 8381, 12042, 16237, 21492, 27677, 33906, 42733, 54180, 65057, 76740, 88771, 104112, 124229, 146490, 169933, 196884, 230807, 263790, 297475, 339372, 385349, 441900, 496375, 557628, 617357, 672510, 743917, 807888
Offset: 1

Views

Author

Den Roussel (DenRoussel(AT)webtv.net)

Keywords

Comments

Observation: a(26) is also equal to A000521(1) = 196884. - Omar E. Pol, Nov 29 2014

Examples

			a(1) = 3, a(2) = 5+7 = 12, a(3) = 11+13+17 = 41, ...
a(26) = 7211+7213+7307+7309+7331+7333+7349+7351+7457+7459+7487+7489+7547+7549+7559+ 7561+7589+7591+7757+7759+7877+7879+7949+7951+8009+8011 = 196884. - _Omar E. Pol_, Nov 29 2014
		

Crossrefs

Cf. A001097 (twin primes), A007468 (sum of next n primes), A000521.

Programs

  • Mathematica
    With[{nn=100},Total/@TakeList[Union[Flatten[Select[ Partition[Prime[ Range[ 300nn]],2,1],#[[2]]-#[[1]]==2&]]],Range[nn]]] (* Requires Mathematica version 11 or later *) (* Harvey P. Dale, Apr 27 2018 *)
  • PARI
    isA001097(n) = (isprime(n) && (isprime(n+2) || isprime(n-2))) ;
    lista(nn) = {v = select(x->isA001097(x), vector(nn, i, i)); idep = 1; for (n=1, sqrtint(#v), print1(sum(i=idep, idep+n-1, v[i]), ", "); idep += n;);} \\ Michel Marcus, Nov 29 2014

Extensions

More terms from Michel Marcus, Nov 29 2014
Previous Showing 11-18 of 18 results.