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.

A180457 Central term of nine successive primes whose average is a prime.

This page as a plain text file.
%I A180457 #10 Nov 20 2024 15:39:18
%S A180457 491,617,757,1489,1787,2141,2143,2269,3529,3571,4723,5563,6337,6451,
%T A180457 6659,6961,6991,7741,7873,7907,8821,10141,10267,10657,12911,13399,
%U A180457 14629,15299,16189,16451,16487,17027,18223,18701,19801,19843,19853,19937
%N A180457 Central term of nine successive primes whose average is a prime.
%C A180457 The average value is not always the central term (see A096701).
%H A180457 Robert Israel, <a href="/A180457/b180457.txt">Table of n, a(n) for n = 1..10000</a>
%F A180457 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.
%e A180457 a(5)=1787 since (1753+1759+1777+1783+1787+1789+1801+1811+1823)/9=16083/9=1787 a prime.
%p A180457 Primes:= select(isprime,[seq(t,t=1..10^5,2)]):
%p A180457 PSums:= ListTools[PartialSums](Primes):
%p A180457 Avgs:= [seq((PSums[i+9]-PSums[i])/9, i=1..nops(PSums)-9)]:
%p A180457 Pos:= select(t -> Avgs[t]::integer and isprime(Avgs[t]),[$1..nops(Avgs)]):
%p A180457 seq(Primes[Pos[i]+5],i=1..nops(Pos)); # _Robert Israel_, Apr 26 2016
%t A180457 Select[Partition[Prime[Range[2500]],9,1],PrimeQ[Mean[#]]&][[;;,5]] (* _Harvey P. Dale_, Nov 20 2024 *)
%Y A180457 Cf. A000040, A096701.
%K A180457 nonn
%O A180457 1,1
%A A180457 _Carmine Suriano_, Sep 06 2010