login
Indices of primes p(i) such that (1/3) (p(i)+p(i+1)+p(i+2)) is an integer.
5

%I #13 Nov 10 2024 02:29:29

%S 2,15,36,39,46,54,55,73,96,99,102,107,110,118,129,160,164,167,179,184,

%T 187,194,199,202,218,231,238,239,242,271,272,273,274,290,291,292,311,

%U 326,339,356,357,358,362,387,419,426,437,438,449,452,464,465,489,508

%N Indices of primes p(i) such that (1/3) (p(i)+p(i+1)+p(i+2)) is an integer.

%C Not every three successive primes have an integer average. The integer averages are in A075540.

%C 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 first 117 3-averages, there are 59 primes. Indices i(n) of first prime in sequence of three primes with integer average are in sequence A064113. Interprimes (s-averages with s=2) are all composite, see A024675.

%H Robert Israel, <a href="/A075541/b075541.txt">Table of n, a(n) for n = 1..10000</a>

%F i(n)-> 1/3 (p(i)+p(i+1)+p(i+2)) is integer.

%e i(2) = 15 because (p(15)+p(16)+p(17)) = 1/3(47 + 53 + 59)=53 (integer average of three successive primes).

%p R:= NULL: count:= 0:

%p q:= 2: r:= 3:

%p for i from 1 while count < 100 do

%p p:= q; q:= r; r:= nextprime(r);

%p if p+q+r mod 3 = 0 then

%p R:= R,i; count:= count+1

%p fi

%p od:

%p R; # _Robert Israel_, Nov 10 2024

%t A075541= {}; Do[If[IntegerQ[s3 = (Prime[i] + Prime[i + 1] + Prime[i + 2])/3], A075541 = Append[A075541, i]], {i, 1000}]; (* 119 terms*)

%Y Cf. A006562, A024675, A075540, A064113.

%K nonn

%O 1,1

%A _Zak Seidov_, Sep 21 2002