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

A077131 Sum of odd-indexed primes.

Original entry on oeis.org

2, 7, 18, 35, 58, 89, 130, 177, 236, 303, 376, 459, 556, 659, 768, 895, 1032, 1181, 1338, 1505, 1684, 1875, 2072, 2283, 2510, 2743, 2984, 3241, 3510, 3787, 4070, 4377, 4690, 5021, 5368, 5721, 6088, 6467, 6856, 7257, 7676, 8107, 8546, 8995, 9456, 9923, 10410
Offset: 1

Views

Author

Jon Perry, Nov 29 2002

Keywords

Comments

Partial sums of A031368. - Michel Marcus, Oct 27 2015

Examples

			p_1=2, p_2=3 and p_3=5, therefore a(2) = p_1 + p_3 = 2 + 5 = 7.
		

Crossrefs

Programs

  • Mathematica
    A077131list[nmax_]:=Accumulate[Prime[Range[1,2nmax,2]]];A077131list[100] (* Paolo Xausa, Aug 28 2023 *)
    Accumulate[Prime[Range[1,101,2]]] (* Harvey P. Dale, Nov 08 2024 *)
  • PARI
    a(n)=if(n<1,0,sum(k=1,n, prime(2*k-1)))

Formula

a(n) ~ n^2 log n. - Charles R Greathouse IV, Jan 09 2025

A077133 a(n) is the difference between the sum of the first n even-indexed primes and the sum of the first n odd-indexed primes.

Original entry on oeis.org

1, 3, 5, 7, 13, 19, 21, 27, 29, 33, 39, 45, 49, 53, 57, 61, 63, 65, 71, 77, 79, 81, 83, 95, 97, 103, 113, 119, 121, 125, 135, 139, 143, 149, 151, 157, 163, 167, 175, 183, 185, 187, 191, 199, 201, 213, 217, 221, 233, 251, 261, 267, 273, 279, 281, 287, 289, 299
Offset: 1

Views

Author

Jon Perry, Nov 29 2002

Keywords

Comments

Some odd numbers such as 11, 17, 23 and 25 never appear.

Examples

			a(2) = 3 as the sum of the first 2 even-indexed primes is prime(2) + prime(4) = 3 + 7 = 10, the sum of the first 2 odd-indexed primes is prime(1) + prime(3) = 2 + 5 = 7 and 10 - 7 = 3. [edited by _Paolo Xausa_, Apr 12 2023]
		

Crossrefs

Programs

  • Maple
    with(numtheory): A008347 := proc(n) option remember; if n = 0 then 0 else abs(A008347(n-1)-ithprime(n)); fi; end proc:
    seq(A008347(2n),n=1..80); # Ridouane Oudra, Aug 31 2019
  • Mathematica
    Table[ Sum[ Prime[2i], {i, 1, n}] - Sum[ Prime[2i - 1], {i, 1, n}], {n, 1, 60}]
    A077133[nmax_]:=Accumulate[Prime[Range[2,2nmax,2]]-Prime[Range[1,2nmax,2]]];A077133[100] (* Paolo Xausa, Apr 12 2023 *)
  • PARI
    my(pc=1, p1s=0, p2s=0); forprime (p=2, 500, pc=!pc; if (pc, p1s+=p, p2s+=p); if (pc,print1(p1s-p2s, ", ")))

Formula

a(n) = Sum_{i=0..n-1} (prime(2*i+2) - prime(2*i+1)).
a(n) = A008347(2n). - Ridouane Oudra, Aug 31 2019
a(n) = A077126(n) - A077131(n). - Michel Marcus, Oct 05 2019

Extensions

Edited and extended by Robert G. Wilson v, Nov 30 2002
Name clarified by Paolo Xausa, Apr 12 2023

A096207 Prime partial sums of the even-indexed primes.

Original entry on oeis.org

3, 23, 71, 151, 1409, 3631, 5519, 8737, 10627, 17609, 33457, 50119, 54869, 62423, 104623, 146141, 154493, 158759, 163063, 195197, 214831, 274243, 279991, 309811, 347983, 468709, 599479, 625969, 634943, 653083, 881663, 936253, 969797, 1134421
Offset: 1

Views

Author

Alonso del Arte, Jul 27 2004

Keywords

Examples

			71 is a term because 71 = 3 + 7 + 13 + 19 + 29.
		

Crossrefs

Primes in A077126.

Programs

  • Maple
    eip:= [seq(ithprime(i),i=2..10^4,2)]:
    select(isprime,ListTools:-PartialSums(eip)); # Robert Israel, Jan 09 2025
  • Mathematica
    Select[Table[Plus @@ Prime[2Range[i]], {i, 1000}], PrimeQ[ # ] &]

Extensions

Name clarified by Robert Israel, Jan 09 2025

A106738 Difference between the sums of odd-indexed primes and even-indexed primes up to and including index 10^n.

Original entry on oeis.org

13, 251, 4031, 52017, 652039, 7746369, 89721621, 1019145113, 11401770915, 126048548239
Offset: 1

Views

Author

Cino Hilliard, May 15 2005

Keywords

Crossrefs

Programs

  • Maple
    A106738 := proc(n) local a,i ; a :=0 ; for i from 1 to 10^n do a := a+(-1)^i*ithprime(i) ; od: RETURN(a) ; end: for n from 1 do print(A106738(n)) ; od: # R. J. Mathar, Feb 13 2008
  • Mathematica
    a[n_] := Module[{a = 0}, For[i = 1, i <= 10^n, i++, a = a + (-1)^i*Prime[i]]; a]; Table[Print[an = a[n]]; an, {n, 1, 8}] (* Jean-François Alcover, Dec 17 2012, after R. J. Mathar *)
  • PARI
    lista(pmax) = {my(pow = 10, k = 0, s = 0); forprime(p = 1, pmax, k++; s += ((-1)^k * p); if(k == pow, print1(s, ", "); pow *= 10));} \\ Amiram Eldar, Jul 02 2024

Formula

a(n) = Sum2 - Sum1, where Sum1 = prime(1) + prime(3) + ... + prime(10^n-1), and Sum2 = prime(2) + prime(4) + ... + prime(10^n).
a(n) = Sum_{i=1..10^n} (-1)^i*A000040(i). - R. J. Mathar, Feb 13 2008
a(n) = A077133(10^n/2). - Amiram Eldar, Jul 02 2024

Extensions

Edited by R. J. Mathar, Feb 13 2008
a(7)-a(8) from Donovan Johnson, Nov 30 2008
a(9)-a(10) from Amiram Eldar, Jul 02 2024

A263546 Numbers k such that k divides the sum of the first k primes with even indices.

Original entry on oeis.org

1, 2, 6, 12, 15, 28, 40, 92, 111, 113, 145, 223, 268, 420, 625, 2080, 2282, 2996, 3371, 19560, 38032, 54426, 1474778, 3763906, 5196340, 6435993, 7808592, 11487666, 16738298, 28145334, 53830258, 57281504, 77275294, 135770496, 164914949
Offset: 1

Views

Author

Altug Alkan, Oct 20 2015

Keywords

Comments

There are 15 values of a(n) < 1000 although A045345 has 4 values A045345(n) < 1000. How do these sequences compare asymptotically?

Examples

			1 is in the sequence because prime(2) = 3 is divisible by 1.
2 is in the sequence because prime(2) + prime(4) = 3 + 7 = 10 is divisible by 2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 10000, Divisible[Sum[Prime[2 i], {i, 1, #}], #] &] (* Michael De Vlieger, Oct 21 2015 *)
  • PARI
    list(lim)=my(v=List(), k, s, t); forprime(p=2, ,if((t++) && t%2==0, s+=p; k++; if(s%k==0, listput(v, k)); if(k>=lim, return(Vec(v)))))

A355726 a(n) = a(n-2) + prime(n-1) for a(0) = a(1) = 0.

Original entry on oeis.org

0, 0, 2, 3, 7, 10, 18, 23, 35, 42, 58, 71, 89, 108, 130, 151, 177, 204, 236, 265, 303, 336, 376, 415, 459, 504, 556, 605, 659, 712, 768, 825, 895, 956, 1032, 1095, 1181, 1246, 1338, 1409, 1505, 1582, 1684, 1763, 1875, 1956, 2072, 2155, 2283, 2378, 2510
Offset: 0

Views

Author

Paul Curtz, Jul 15 2022

Keywords

Crossrefs

Cf. A077131 (even bisection), A077126 (odd bisection).
Cf. A008347 (first differences), (-1)^n*A330547 (second differences).

Programs

  • Mathematica
    Join[{0},Accumulate[FoldList[#2-#1&,0,Prime[Range[100]]]]] (* Paolo Xausa, Dec 04 2023 *)

Formula

a(2*n) = A077131(n), for n>=1.
a(2*n+1) = A077126(n), for n>=1.
Showing 1-6 of 6 results.