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

A109722 Sum of first 2n primes.

Original entry on oeis.org

0, 5, 17, 41, 77, 129, 197, 281, 381, 501, 639, 791, 963, 1161, 1371, 1593, 1851, 2127, 2427, 2747, 3087, 3447, 3831, 4227, 4661, 5117, 5589, 6081, 6601, 7141, 7699, 8275, 8893, 9523, 10191, 10887, 11599, 12339, 13101, 13887, 14697, 15537, 16401, 17283
Offset: 0

Views

Author

Giovanni Teofilatto, Aug 10 2005

Keywords

Comments

Bisection of A007504.

Crossrefs

Programs

  • Mathematica
    f[n_] := Sum[Prime[k], {k, n}]; Table[f[2n], {n, 0, 43}]
    Join[{0},With[{nn=100},Take[Accumulate[Prime[Range[nn]]],{2,nn,2}]]] (* Harvey P. Dale, Dec 20 2021 *)

Formula

a(n) = A007504(2n).

Extensions

Edited and extended by Ray Chandler, Aug 11 2005

A270828 a(n) = (Sum_{k=1..2n-1} prime(k)) mod prime(n).

Original entry on oeis.org

0, 1, 3, 2, 1, 4, 0, 5, 3, 17, 30, 23, 35, 17, 23, 24, 41, 19, 38, 3, 54, 4, 44, 77, 38, 98, 62, 25, 3, 73, 108, 67, 27, 124, 108, 66, 34, 4, 130, 102, 80, 40, 32, 169, 132, 78, 79, 128, 75, 5, 215, 227, 189, 243, 255, 259, 261, 193, 197, 162, 98, 148, 9, 281, 213, 194, 87, 109, 261, 171
Offset: 1

Views

Author

Altug Alkan, Mar 23 2016

Keywords

Comments

a(n) = 0 for n = 1, 7, 100. Are there any other values?
No other zero up to n=200000. - Michel Marcus, Jan 31 2019

Examples

			a(2) = 1 because (2 + 3 + 5) mod 3 = 1.
a(7) = 0 because (2 + 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 + 31 + 37 + 41) mod 17 = 238 mod 17 = 0.
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[Sum[Prime@ k, {k, 2 n - 1}], Prime@ n], {n, 70}] (* Michael De Vlieger, Mar 24 2016 *)
  • PARI
    for(n=1, 1e2, print1(sum(k=1, 2*n-1, prime(k)) % prime(n), ", "));
    
  • PARI
    lista(nn) = {my(s=0, p=1); for (n=1, nn, p = nextprime(p+1); s += p; print1(s % prime(n), ", "); p = nextprime(p+1); s += p;);} \\ Michel Marcus, Jan 31 2019

Formula

a(n) = A007504(2*n-1) mod A000040(n).

A321178 One-half the sum of the first 2n + 1 primes.

Original entry on oeis.org

1, 5, 14, 29, 50, 80, 119, 164, 220, 284, 356, 437, 530, 632, 740, 860, 994, 1138, 1292, 1457, 1633, 1819, 2014, 2219, 2444, 2675, 2915, 3169, 3435, 3709, 3991, 4291, 4603, 4927, 5269, 5620, 5983, 6359, 6745, 7144, 7558, 7984, 8420, 8866, 9325, 9790, 10273
Offset: 0

Views

Author

Martin Michael Musatov, Oct 29 2018

Keywords

Crossrefs

Formula

a(n) = A109723(n)/2 = A007504(2n+1)/2.

A383938 a(n) is the least positive integer k such that b(2*j) is prime for 1 <= j <= n but not prime for j = n+1, where b(1) = k and b(m+1) = b(m) + prime(m) for m >= 1.

Original entry on oeis.org

2, 5, 21, 129, 69, 1, 51, 23991, 171, 1371, 3, 322141431, 1431357020859
Offset: 0

Views

Author

Om S. M. Yadav, Aug 18 2025

Keywords

Comments

Similar to A227547, primes are added in successive manner except that here the sequence breaks if an even-indexed term is not prime and considers preceding even-indexed prime as the last term of the sequence. For example, a(2) = 21 [21, 23, 26, 31, 38, 49] but since 49 is not prime, last two terms (38 and 49) are omitted leaving 31 as last term in the sequence.
a(12) is the last term, because b(j) is always divisible by 11 for some j in {2, 4, 6, 8, 10, 14, 16, 18, 22, 24, 26}. - Pontus von Brömssen, Aug 19 2025

Examples

			a(n) = k, b(m+1) = b(m) + prime(m); b(1) = k
For n = 0, a(0) = 2; b(m+1) = b(m) + prime(m): [2]
For n = 1, a(1) = 5; b(m+1) = b(m) + prime(m): [5, 7(5+2)]
For n = 2, a(2) = 21; b(m+1) = b(m) + prime(m): [21, 23(21+2), 26(23+3), 31(26+5)]
For n = 3, a(3) = 129; b(m+1) = b(m) + prime(m): [129, 131(129+2), 134(131+3), 139(134+5), 146(139+7), 157(146+11)]
For n = 4, a(4) = 69; b(m+1) = b(m) + prime(m): [69, 71(69+2), 74(71+3), 79(74+5), 86(79+7), 97(86+11), 110(97+13), 127(110+17)]
For n = 5, a(5) = 1; b(m+1) = b(m) + prime(m): [1, 3(1+2), 6(3+3), 11(6+5), 18(11+7), 29(18+11), 42(29+13), 59(42+17), 78(59+19), 101(78+23)]
For a(n), even-indexed term is prime. e.g. for a(3) = 129 [129, 131, 134, 139, 146, 157], even indexed terms 131, 139, 157 are primes.
		

Crossrefs

Programs

  • PARI
    a(n) = my(vp=concat(2, vector(n+1, i, sum(k=1, 2*i+1, prime(k)))), v=concat(vector(n, i, 1), 0), k=1); while (apply(ispseudoprime, vector(n+1, i, vp[i]+k)) != v, k++); k; \\ Michel Marcus, Aug 19 2025

Extensions

a(11) from Michel Marcus, Aug 19 2025
a(12) from Pontus von Brömssen, Aug 19 2025
Showing 1-4 of 4 results.