login
Integer averages of first k primes for some k.
106

%I #50 Jun 12 2024 14:23:09

%S 2,38,110,3066,60020,740282,2340038,29380602,957565746,31043311588,

%T 569424748566,7207204117608,10871205353578,196523412770096,

%U 2665506690112870,122498079071529726

%N Integer averages of first k primes for some k.

%C 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.

%C a(13) > (sum of first pi(2*10^13) primes)/pi(2*10^13). - _Donovan Johnson_, Aug 23 2010

%C a(16) > 2688482385366706. - _Bruce Garner_, Mar 06 2021

%C a(17) > 125237452139872271. - _Paul W. Dyson_, Sep 26 2022

%H OEIS Wiki, <a href="https://oeis.org/wiki/Sums_of_primes_divisibility_sequences">Sums of powers of primes divisibility sequences</a>

%H Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_031.htm">Puzzle 31.- The Average Prime number, APN(k) = S(Pk)/k</a>, The Prime Puzzles & Problems Connection.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimeSums.html">Prime Sums</a>.

%F a(n) = A050247(n)/A045345(n).

%e 38 is average of first k = 23 primes; 110 (k = 53); 3066 (k = 853); 60020 (k = 11869).

%t a=0;lst={};Do[p=Prime[n];a+=p;If[a/n==IntegerPart[a/n],AppendTo[lst,a/n]],{n,10!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Aug 05 2009 *)

%t Module[{nn=10^6,prs},prs=Prime[Range[nn]];Select[Table[Mean[Take[prs,n]],{n,nn}],IntegerQ]] (* The program generates the first 7 terms of the sequence. *) (* _Harvey P. Dale_, Jun 12 2024 *)

%o (PARI) s=n=0;forprime(p=2,1e9,if((s+=p)%n++==0, print1(s/n", "))) \\ _Charles R Greathouse IV_, Nov 07 2014

%Y Cf. A085450 (smallest m > 1 such that m divides Sum_{k=1..m} prime(k)^n).

%Y Cf. A007504, A045345, A171399, A128165, A233523, A050247, A050248.

%Y Cf. A024450, A111441, A217599, A128166, A233862, A217600, A217601.

%K nonn,more

%O 1,1

%A _Eric W. Weisstein_

%E Edited by _N. J. A. Sloane_ at the suggestion of _David W. Wilson_, Jun 23 2007

%E a(10)-a(11) from _Giovanni Resta_ via _Ray Chandler_, Jul 19 2010

%E a(12) from _Donovan Johnson_, Aug 23 2010

%E a(13) from _Robert Price_, Mar 17 2013

%E a(14)-a(15) from _Bruce Garner_, Mar 06 2021

%E a(16) from _Paul W. Dyson_, Sep 26 2022