OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
Third twin prime pair = (11,13) with average 12 = 1100_2, with 2 ones, so a(3)=2.
MATHEMATICA
seq={1}; Do[If[And @@ PrimeQ[6n + {-1, 1}], AppendTo[seq, DigitCount[6n, 2, 1]]], {n, 1, 600}]; seq (* Amiram Eldar, Dec 19 2019 *)
DigitCount[#, 2, 1]&/@(Mean/@Select[Partition[Prime[Range[1000]], 2, 1], #[[2]]- #[[1]] == 2&]) (* Harvey P. Dale, Dec 12 2021 *)
PROG
(Magma) [&+Intseq(p+1, 2):p in PrimesUpTo(3000)|IsPrime(p+2)]; // Marius A. Burtea, Dec 19 2019
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Steven Lubars (lubars(AT)gmail.com), Oct 03 2009
EXTENSIONS
More terms from Amiram Eldar, Dec 19 2019
STATUS
approved