OFFSET
1,1
COMMENTS
LINKS
Aaron Toponce, Table of n, a(n) for n = 1..1000
EXAMPLE
p = 491 = (463 + 467 + 479 + 487 + 491 + 499 + 503 + 509 + 521)/9 = 4419/9.
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]; s9=Prime[n-3]+s7+Prime[n+5]; If[Equal[s9/9, Prime[n+1]], Print[Prime[n+1]]], {n, 4, 10000}]
(* Second program: *)
With[{k = 4}, Select[MapIndexed[{Prime[First@ #2 + k], #1} &, Mean /@ Partition[Prime@ Range[3000], 2 k + 1, 1]], SameQ @@ # &][[All, 1]]] (* Michael De Vlieger, Feb 15 2018 *)
Select[Partition[Prime[Range[3000]], 9, 1], Mean[#]==#[[5]]&][[;; , 5]] (* Harvey P. Dale, Mar 09 2023 *)
PROG
(GAP) P:=Filtered([1..50000], IsPrime);;
a:=List(Filtered(List([0..3000], k->List([5..13], j->P[j-4+k])), i-> Sum(i)/9=i[5]), m->m[5]); # Muniru A Asiru, Feb 14 2018
(PARI) isok(p) = {if (isprime(p), k = primepi(p); if (k > 4, sum(i=k-4, k+4, prime(i)) == 9*p; ); ); } \\ Michel Marcus, Mar 07 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Apr 08 2003
STATUS
approved