OFFSET
0,2
COMMENTS
a(24) > 10^12. - Giovanni Resta, Mar 23 2017
LINKS
Giovanni Resta, Terms for n <= 120 (some missing)
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