OFFSET
1,1
COMMENTS
The arithmetic mean of 6 primes in its "neighborhood"; not to be confused with 'Triply balanced primes' (A081415).
A balanced prime of order three is not necessarily balanced of order one (A006562) or two (A082077), etc. [Typo corrected by Zak Seidov, Jul 23 2008]
LINKS
Aaron Toponce, Table of n, a(n) for n = 1..1000
EXAMPLE
p = 53 = (41 + 43 + 47 + 53 + 59 + 61 + 67)/7 = 371/7 i.e. it is the arithmetic mean.
MATHEMATICA
Do[s3=Prime[n]+Prime[n+1]+Prime[n+2]; s5=Prime[n-1]+s3+Prime[n+3]; s7=Prime[n-2]+s5+Prime[n+4]; If[Equal[s7/7, Prime[n+1]], Print[Prime[n+1]]], {n, 3, 5000}]
(* Second program: *)
With[{k = 3}, Select[MapIndexed[{Prime[First@ #2 + k], #1} &, Mean /@ Partition[Prime@ Range[10^3], 2 k + 1, 1]], SameQ @@ # &][[All, 1]]] (* Michael De Vlieger, Feb 15 2018 *)
Select[Partition[Prime[Range[1500]], 7, 1], Mean[#]==#[[4]]&][[All, 4]] (* Harvey P. Dale, Jul 01 2022 *)
PROG
(GAP) P:=Filtered([1..10000], IsPrime);;
a:=List(Filtered(List([0..1000], k->List([4..10], j->P[j-3+k])), i->
Sum(i)/7=i[4]), m->m[4]); # Muniru A Asiru, Feb 14 2018
(PARI) isok(p) = {if (isprime(p), k = primepi(p); if (k > 3, sum(i=k-3, k+3, prime(i)) == 7*p; ); ); } \\ Michel Marcus, Mar 07 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Apr 08 2003
STATUS
approved