OFFSET
1,1
COMMENTS
The average value is not always the central term (see A096701).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n)=[p(n-4)+p(n-3)+p(n-2)+p(n-1)+p(n)+p(n+1)+p(n+2)+p(n+3)+p(n+4)]/9.
EXAMPLE
a(5)=1787 since (1753+1759+1777+1783+1787+1789+1801+1811+1823)/9=16083/9=1787 a prime.
MAPLE
Primes:= select(isprime, [seq(t, t=1..10^5, 2)]):
PSums:= ListTools[PartialSums](Primes):
Avgs:= [seq((PSums[i+9]-PSums[i])/9, i=1..nops(PSums)-9)]:
Pos:= select(t -> Avgs[t]::integer and isprime(Avgs[t]), [$1..nops(Avgs)]):
seq(Primes[Pos[i]+5], i=1..nops(Pos)); # Robert Israel, Apr 26 2016
MATHEMATICA
Select[Partition[Prime[Range[2500]], 9, 1], PrimeQ[Mean[#]]&][[;; , 5]] (* Harvey P. Dale, Nov 20 2024 *)
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Carmine Suriano, Sep 06 2010
STATUS
approved