A097961 Numbers k such that the sum of the first k odd primes is divisible by k.
1, 2, 3, 60, 73, 357, 690, 970, 1560, 1844, 2016, 2071, 3267, 7034, 22388, 37244, 137166, 808334, 1126996, 3420839, 4971830, 14647946, 15553569, 21957090, 31327140, 90514444, 98576118, 204198604, 210662116, 553825420, 1395717645, 2820805440, 6780317160
Offset: 1
Examples
a(1) = 1 since 3 is divisible by 1. a(2) = 2 since 3 + 5 = 8 is divisible by 2. a(3) = 3 since 3 + 5 + 7 = 15 is divisible by 3. a(4) != 4 since 3 + 5 + 7 + 11 = 26 is not divisible by 4. 98576118 * 977748014 = 96382603602329652.
Programs
-
Mathematica
NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 2; s = 0; Do[p = NextPrim[p]; s = s + p; If[ Mod[s, n] == 0, Print[n]], {n, 151666666}] (* Robert G. Wilson v, Oct 23 2004 *)
-
Python
from sympy import sieve L = sieve.primerange(3, 1.7*10**11); s, k = 0, 0 for p in L: s += p; k += 1 if s%k == 0: print(k, end = ", ") # Ya-Ping Lu, Jun 16 2023
Formula
Sum_{i=1..a(n)} prime(i) = n*A363477(n). - Ya-Ping Lu, Jun 16 2023
Extensions
More terms from Robert G. Wilson v, Oct 23 2004
a(28)-a(30) from Rémy Sigrist, Sep 25 2016
a(31)-a(33) from Ya-Ping Lu, Jun 16 2023