login
A284157
Least index k such that (Sum_{i=1..k} prime(i)) mod prime(k) = n.
1
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,2
COMMENTS
a(24) > 10^12. - Giovanni Resta, Mar 23 2017
EXAMPLE
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.
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 *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Paolo P. Lava, Mar 21 2017
EXTENSIONS
a(0), a(16), a(18), a(22) from Giovanni Resta, Mar 22 2017
STATUS
approved