login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A094931 A measure of the excess of the mean of the set of 4 consecutive primes over the 2nd of the set. 1
5, 6, 8, 4, 8, 4, 12, 10, 4, 14, 4, 4, 12, 14, 8, 4, 14, 4, 6, 14, 8, 16, 14, 2, 4, 8, 4, 20, 28, 0, 10, 8, 20, 0, 16, 10, 8, 14, 8, 8, 20, 0, 8, 12, 34, 16, 0, 4, 12, 10, 8, 24, 8, 12, 8, 4, 14, 4, 10, 32, 22, 0, 4, 20, 30, 8, 16, 0, 12, 16, 16, 10, 10, 8, 16, 14, 8, 22, 14, 4, 20, 0, 14, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET
4,1
COMMENTS
Let (prime(n-3)+prime(n-2)+prime(n-1)+prime(n))/4 = A034963(n-3)/4 be the arithmetic mean of 4 consecutive primes, and prime(n-2) the third largest. Then A034963(n-3)-4*prime(n-2) is an integer measure of the excess of the mean. We define a(n) by the excess if positive, else by 0.
LINKS
MAPLE
A094931 := proc(n)
local p3, p2, p1, p0 ;
p3 := ithprime(n-3) ;
p2 := ithprime(n-2) ;
p1 := ithprime(n-1) ;
p0 := ithprime(n) ;
max(p3-3*p2+p1+p0, 0) ;
end proc:
seq(A094931(n), n=4..50) ; # R. J. Mathar, Nov 15 2019
MATHEMATICA
a=Table[If[(Prime[n-3]+Prime[n-2]+Prime[n-1]+Prime[n])/4-Prime[n-2]>0, 4*((Prime[n-3]+Prime[n-2]+Prime[n-1]+Prime[n])/4-Prime[n-2]), 0], {n, 4, 204}]
If[#<=0, 0, #]&/@(4(Total[#]/4-#[[2]])&/@Partition[Prime[Range[90]], 4, 1]) (* Harvey P. Dale, Mar 02 2015 *)
CROSSREFS
Cf. A034963.
Sequence in context: A091659 A271571 A349577 * A239354 A011498 A330863
KEYWORD
nonn,less
AUTHOR
Roger L. Bagula, Jun 17 2004
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 08:15 EDT 2024. Contains 371698 sequences. (Running on oeis4.)