OFFSET
1,1
COMMENTS
Numbers that are both the average of two successive primes and the product of two successive primes.
Includes p*(p+2) where p, p+2,p^2+2*p-6 and p^2+2*p+6 are all primes but p^2+2*p-2, p^2+2*p-4, p^2+2*p+2 and p^2+2*p+4 are composite. The Generalized Bunyakovsky Conjecture implies there are infinitely many such terms.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 667 is a term because 667 = (661 + 673)/2 = 23*29 where 661 and 673 are successive primes and 23 and 29 are successive primes.
MAPLE
R:= NULL: count:= 0:
q:= 2:
while count < 50 do
p:= q; q:= nextprime(q);
r:= p*q;
if prevprime(r)+nextprime(r)=2*r then
R:= R, r; count:= count+1;
fi
od:
R;
MATHEMATICA
Select[Table[Prime[n]*Prime[n + 1], {n, 1, 800}], Plus @@ NextPrime[#, {-1, 1}] == 2*# &] (* Amiram Eldar, Jun 03 2022 *)
Select[Times@@@Partition[Prime[Range[1000]], 2, 1], (NextPrime[#]+NextPrime[#, -1])/2==#&] (* Harvey P. Dale, Nov 03 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jun 03 2022
STATUS
approved