OFFSET
1,1
LINKS
Zak Seidov, Table of n, a(n) for n = 1..3000
EXAMPLE
181 is in the sequence because it is prime and is the arithmetic mean of the consecutive primes 173, 179, 181 and 191.
MAPLE
a:=proc(n) local nn: nn:=(ithprime(n)+ithprime(n+1)+ithprime(n+2)+ithprime(n+3))/4: if type(nn, integer)=true and isprime(nn)=true then nn else fi end: seq(a(n), n=1..1300); # Emeric Deutsch, Mar 07 2007
MATHEMATICA
lst={}; Do[If[PrimeQ[p=(Prime[n]+Prime[n+1]+Prime[n+2]+Prime[n+3])/4], AppendTo[lst, p]], {n, 8!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jul 28 2009 *)
pr=Prime[Range[114000(* for first 3015 terms *)]];
Select[Mean/@Partition[pr, 4, 1], PrimeQ] (* Zak Seidov, Apr 22 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Mar 03 2007
EXTENSIONS
More terms from Emeric Deutsch, Mar 07 2007
STATUS
approved