login
A075540
Integers that are the average of three successive primes.
10
5, 53, 157, 173, 211, 257, 263, 373, 511, 537, 563, 593, 607, 653, 733, 947, 977, 999, 1073, 1103, 1123, 1187, 1223, 1239, 1367, 1461, 1501, 1511, 1541, 1747, 1753, 1763, 1773, 1899, 1907, 1917, 2071, 2181, 2287, 2401, 2409, 2417, 2449, 2677, 2903, 2963
OFFSET
1,1
COMMENTS
Not every three successive primes have an integer average. The integer averages are in the sequence.
Not all of these 3-averages are prime: the prime 3-averages are in A006562 (balanced primes). There are surprisingly many prime 3-averages: among the first 10000 terms of the sequence there are 2417 primes. Indices i(n) of first prime in sequence of three primes with integer average are in A075541, for prime 3-averages i(n) are in A064113. Interprimes (s-averages with s=2) are all composite, see A024675. (Edited by Zak Seidov, Sep 01 2015 )
LINKS
FORMULA
a(n) = (1/3) (p(i)+p(i+1)+p(i+2)), for some i(n).
EXAMPLE
a(1) = 5 = (1/3)(3+5+7), first integer average of three successive primes; next is: a(2) = 53 = (1/3)(47 + 53 + 59); up to n=8 all terms are prime; while a(9) = 511 = (1/3)( 503 + 509 + 521) is the first nonprime 3-average: 511=7*73.
MAPLE
N:= 10^4: # to get all terms using primes <= N
Primes:= select(isprime, [2, seq(2*i+1, i=1..(N-1)/2)]):
select(type, (Primes[1..-3] + Primes[2..-2] + Primes[3..-1])/3, integer); # Robert Israel, Sep 01 2015
MATHEMATICA
Select[MovingAverage[Prime[Range[500]], 3], IntegerQ] (* Harvey P. Dale, Aug 10 2012 *)
PROG
(Haskell)
a075540 n = a075540_list !! (n-1)
a075540_list = map fst $ filter ((== 0) . snd) $
zipWith3 (\x y z -> divMod (x + y + z) 3)
a000040_list (tail a000040_list) (drop 2 a000040_list)
-- Reinhard Zumkeller, Jan 20 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Sep 21 2002
EXTENSIONS
Comment and example edited, inefficient Mma removed by Zak Seidov, Sep 01 2015
STATUS
approved