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.

A284157 Least index k such that (Sum_{i=1..k} prime(i)) mod prime(k) = n.

Original entry on oeis.org

1, 8, 2, 4, 8094, 11, 5, 7, 9, 43, 16, 30, 12, 10, 134, 621, 2902940711, 32, 86124, 3097, 715, 83, 142034741, 14
Offset: 0

Views

Author

Paolo P. Lava, Mar 21 2017

Keywords

Comments

a(24) > 10^12. - Giovanni Resta, Mar 23 2017

Examples

			a(13) = 10 because the sum of the first 10 primes is 2 + 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 = 129 and 129 mod 29 = 13.
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local a,k,n; for n from 1 to q do a:=0; for k from 1 to q do a:=a+ithprime(k);
    if a mod ithprime(k)=n then print(k); break; fi; od; od; end: P(10^9);
  • Mathematica
    a[n_] := Block[{s = 2, p = 2, i = 1}, While[Mod[s, p] != n, i++; p = NextPrime@ p; s += p]; i]; a /@ Range[0, 15] (* Giovanni Resta, Mar 22 2017 *)

Extensions

a(0), a(16), a(18), a(22) from Giovanni Resta, Mar 22 2017