%I #15 Feb 17 2022 09:59:15
%S 4,11,34,113,284,441,634,731,943,1226,1657,2343,2469,3767,3931,4271,
%T 4712,5759,5963,7154,8221,8467,8971,9362,9763,12655,13279,13595,13915,
%U 15941,17560,19641,21261,21675,22091,22937,23363,23793,24671,26702
%N One seventh of the sum of the first n primes, when an integer.
%C a(1) = 4 and a(6) = 441 are perfect squares. What is the next term in this subsequence? Answer from Stefan Steinerberger: a(103)=315844=562^2.
%D Bach, E. and Shallit, J. Sect. 2.7 in Algorithmic Number Theory, Vol. 1: Efficient Algorithms. Cambridge, MA: MIT Press, 1996.
%D H. L. Nelson, "Prime Sums", J. Rec. Math., 14 (1981), 205-206.
%H Harvey P. Dale, <a href="/A112272/b112272.txt">Table of n, a(n) for n = 1..1000</a>
%H Leo Moser, <a href="https://doi.org/10.4153/CMB-1963-013-1">Notes on number theory. III. On the sum of consecutive primes</a>, Canad. Math. Bull. 6 (1963), pp. 159-161.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimeSums.html">Prime Sums</a>.
%F {a(n)} = {A007504(k)/7 iff 7 | A007504(k)}. {a(n)} = {(p_1 + p_2 + ... + p_k)/7 iff the sum is an integer}.
%e a(1) = 4 = (2+3+5+7+11)/7 = A007504(5)/7 = 28/7.
%e a(2) = 11 = (2+3+5+7+11+13+17+19)/5 = A007504(8)/7 = 77/7.
%e a(3) = 34 = A007504(13)/5 = 238/7.
%e a(4) = 113 = A007504(22)/5 = 791/7.
%e a(5) = 284 = A007504(33)/5 = 1988/7.
%e a(6) = 441 = A007504(40)/5 = 3087/7.
%t s = 0; lst = {}; Do[s = s + Prime[n]; If[Mod[s, 7] == 0, AppendTo[lst, s/7]], {n, 270}]; lst (* _Robert G. Wilson v_ *)
%t Select[Accumulate[Prime[Range[300]]]/7,IntegerQ] (* _Harvey P. Dale_, Nov 26 2014 *)
%Y Cf. A000040, A007504, A112040.
%K easy,nonn
%O 1,1
%A _Jonathan Vos Post_, Nov 30 2005
%E More terms from _Stefan Steinerberger_ and _Robert G. Wilson v_, Dec 02 2005
|