A075540 Integers that are the average of three successive primes.
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
Keywords
Examples
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.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
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
-
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 *)
Formula
a(n) = (1/3) (p(i)+p(i+1)+p(i+2)), for some i(n).
Extensions
Comment and example edited, inefficient Mma removed by Zak Seidov, Sep 01 2015
Comments