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.

This page as a plain text file.
%I A284157 #29 Mar 23 2017 06:22:44
%S A284157 1,8,2,4,8094,11,5,7,9,43,16,30,12,10,134,621,2902940711,32,86124,
%T A284157 3097,715,83,142034741,14
%N A284157 Least index k such that (Sum_{i=1..k} prime(i)) mod prime(k) = n.
%C A284157 a(24) > 10^12. - _Giovanni Resta_, Mar 23 2017
%H A284157 Giovanni Resta, <a href="/A284157/a284157.txt">Terms for n <= 120 (some missing)</a>
%e A284157 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.
%p A284157 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);
%p A284157 if a mod ithprime(k)=n then print(k); break; fi; od; od; end: P(10^9);
%t A284157 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 *)
%Y A284157 Cf. A000040, A007504, A038664.
%K A284157 nonn,more
%O A284157 0,2
%A A284157 _Paolo P. Lava_, Mar 21 2017
%E A284157 a(0), a(16), a(18), a(22) from _Giovanni Resta_, Mar 22 2017