This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A075540 #37 Mar 27 2020 06:30:38 %S A075540 5,53,157,173,211,257,263,373,511,537,563,593,607,653,733,947,977,999, %T A075540 1073,1103,1123,1187,1223,1239,1367,1461,1501,1511,1541,1747,1753, %U A075540 1763,1773,1899,1907,1917,2071,2181,2287,2401,2409,2417,2449,2677,2903,2963 %N A075540 Integers that are the average of three successive primes. %C A075540 Not every three successive primes have an integer average. The integer averages are in the sequence. %C A075540 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 ) %H A075540 Reinhard Zumkeller, <a href="/A075540/b075540.txt">Table of n, a(n) for n = 1..10000</a> %F A075540 a(n) = (1/3) (p(i)+p(i+1)+p(i+2)), for some i(n). %e A075540 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. %p A075540 N:= 10^4: # to get all terms using primes <= N %p A075540 Primes:= select(isprime,[2,seq(2*i+1, i=1..(N-1)/2)]): %p A075540 select(type,(Primes[1..-3] + Primes[2..-2] + Primes[3..-1])/3,integer); # _Robert Israel_, Sep 01 2015 %t A075540 Select[MovingAverage[Prime[Range[500]],3],IntegerQ] (* _Harvey P. Dale_, Aug 10 2012 *) %o A075540 (Haskell) %o A075540 a075540 n = a075540_list !! (n-1) %o A075540 a075540_list = map fst $ filter ((== 0) . snd) $ %o A075540 zipWith3 (\x y z -> divMod (x + y + z) 3) %o A075540 a000040_list (tail a000040_list) (drop 2 a000040_list) %o A075540 -- _Reinhard Zumkeller_, Jan 20 2012 %Y A075540 Cf. A006562, A024675, A075541, A064113. %Y A075540 Cf. A102655. %K A075540 nonn %O A075540 1,1 %A A075540 _Zak Seidov_, Sep 21 2002 %E A075540 Comment and example edited, inefficient Mma removed by _Zak Seidov_, Sep 01 2015