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.

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