OFFSET
1,2
COMMENTS
EXAMPLE
a(1) = 1, because the first average of a twin prime pair is 4 and 4*3 = 12 is also an average of a twin prime pair.
a(2) = 2, because 6*3 = 18 and 6*5 = 30.
a(3) = 1, because 12*5 = 60.
a(4) = 1, because 18*11 = 198.
a(5) = 2, because 30*5 = 150 and 30*19 = 570.
a(10) = 0, because there are no twin primes p less than 108 such that 108*p is an average of a twin prime pair.
MATHEMATICA
twinMidQ[n_] := And @@ PrimeQ[n + {-1, 1}]; twinMids = Select[Range[3500], twinMidQ]; numPrimes[n_] := Module[{p = 2, count = 0}, While[p < n, If[Or @@ PrimeQ[p + {-2, 2}] && twinMidQ[p * n], count++]; p = NextPrime[p] ]; count]; numPrimes /@ twinMids (* Amiram Eldar, Jan 21 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Dmitry Kamenetsky, Jan 20 2020
STATUS
approved