cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A050248 Integer averages of first k primes for some k.

Original entry on oeis.org

2, 38, 110, 3066, 60020, 740282, 2340038, 29380602, 957565746, 31043311588, 569424748566, 7207204117608, 10871205353578, 196523412770096, 2665506690112870, 122498079071529726
Offset: 1

Views

Author

Keywords

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.
a(13) > (sum of first pi(2*10^13) primes)/pi(2*10^13). - Donovan Johnson, Aug 23 2010
a(16) > 2688482385366706. - Bruce Garner, Mar 06 2021
a(17) > 125237452139872271. - Paul W. Dyson, Sep 26 2022

Examples

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

Crossrefs

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

Programs

  • Mathematica
    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 *)
    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 *)
  • PARI
    s=n=0;forprime(p=2,1e9,if((s+=p)%n++==0, print1(s/n", "))) \\ Charles R Greathouse IV, Nov 07 2014

Formula

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

Extensions

Edited by N. J. A. Sloane at the suggestion of David W. Wilson, Jun 23 2007
a(10)-a(11) from Giovanni Resta via Ray Chandler, Jul 19 2010
a(12) from Donovan Johnson, Aug 23 2010
a(13) from Robert Price, Mar 17 2013
a(14)-a(15) from Bruce Garner, Mar 06 2021
a(16) from Paul W. Dyson, Sep 26 2022