|
|
A045345
|
|
Numbers k such that k divides sum of first k primes A007504(k).
|
|
125
|
|
|
1, 23, 53, 853, 11869, 117267, 339615, 3600489, 96643287, 2664167025, 43435512311, 501169672991, 745288471601, 12255356398093, 153713440932055, 6361476515268337
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(10) and a(11) were found by Giovanni Resta (Nov 15 2004). He states that there are no other terms for primes p < 4011201392413. See link to Prime Puzzles, Puzzle 31 below. - Alexander Adamchuk, Aug 21 2006
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
23 is in the sequence because the sum of the first 23 primes is 874 and that's 23 * 38.
53 is in the sequence because the sum of the first 53 primes is 5830 and that's 53 * 110.
83 is not in the sequence because the sum of the first 83 primes is 15968, which leaves a remainder of 32 when divided by 83.
The sum of the first a(14) primes is equal to a(14)*196523412770096.
|
|
MAPLE
|
with(numtheory); ListA045345:=proc(q) local k, n;
for n from 1 to q do if add(ithprime(k), k=1..n) mod n=0 then print(n);
|
|
MATHEMATICA
|
s = 0; t = {}; Do[s = s + Prime[n]; If[ Mod[s, n] == 0, AppendTo[t, n]], {n, 1000000}]; t (* Alexander Adamchuk, Aug 21 2006 *)
nn = 4000000; With[{acpr = Accumulate[Prime[Range[nn]]]}, Select[Range[nn], Divisible[acpr[[#]], #] &]] (* Harvey P. Dale, Sep 14 2012 *)
A007504 = Cases[Import["https://oeis.org/A007504/b007504.txt", "Table"], {_, _}][[All, 2]]; Select[Range[10^5], Divisible[A007504[[# + 1]], #] &] (* Robert Price, Mar 13 2020 *)
|
|
PROG
|
(PARI) isok(n) = (vecsum(primes(n)) % n) == 0; \\ Michel Marcus, Nov 26 2020
(Python)
from itertools import accumulate, count, islice
from sympy import prime
def A045345_gen(): return (i+1 for i, m in enumerate(accumulate(prime(n) for n in count(1))) if m % (i+1) == 0)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,nice,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|