login
Numbers k such that 5 divides prime(1) + ... + prime(k).
12

%I #12 May 14 2024 03:59:02

%S 2,3,9,11,17,25,29,31,51,53,57,62,71,77,85,89,91,101,103,105,116,118,

%T 131,147,153,156,159,167,173,180,186,188,190,195,209,226,230,239,242,

%U 245,256,259,261,266,268,283,292,298,303,314,317,324,349,352,357,364,366,368,376

%N Numbers k such that 5 divides prime(1) + ... + prime(k).

%H Amiram Eldar, <a href="/A111319/b111319.txt">Table of n, a(n) for n = 1..10000</a>

%t Position[Accumulate[Prime[Range[400]]], _?(Divisible[#, 5] &)] // Flatten (* _Amiram Eldar_, May 14 2024 *)

%o (PARI) lista(pmax) = {my(s = 0, k = 0); forprime(p = 2, pmax, k++; s += p; if(!(s % 5), print1(k, ", ")));} \\ _Amiram Eldar_, May 14 2024

%Y Cf. A007504, A103208, A111318, A111320, A111321, A111322, A111323, A111324, A111325, A111326, A111327.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, Nov 05 2005