login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
a(24) > 10^12. - Giovanni Resta, Mar 23 2017
LINKS
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
Sequence in context: A217294 A109614 A248301 * A201583 A243370 A179048
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 02:53 EDT 2024. Contains 371906 sequences. (Running on oeis4.)