login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A166008 Number of ones in the binary representation of the average of twin prime pairs. 1
1, 2, 2, 2, 4, 3, 4, 2, 4, 4, 3, 4, 4, 2, 4, 4, 4, 4, 4, 4, 5, 4, 4, 6, 3, 5, 4, 5, 3, 4, 5, 6, 6, 6, 6, 8, 2, 4, 4, 3, 2, 6, 8, 4, 5, 4, 5, 6, 6, 5, 4, 5, 4, 5, 7, 8, 5, 7, 6, 8, 8, 8, 3, 3, 2, 4, 6, 7, 6, 4, 4, 6, 8, 3, 5, 3, 5, 6, 7, 7, 7, 7, 4, 4, 6, 7, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = A000120(A014574(n)). - Michel Marcus, Dec 19 2019
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
Sequence in context: A083403 A114091 A209580 * A194291 A194323 A070867
KEYWORD
base,nonn
AUTHOR
Steven Lubars (lubars(AT)gmail.com), Oct 03 2009
EXTENSIONS
More terms from Amiram Eldar, Dec 19 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 06:04 EDT 2024. Contains 371906 sequences. (Running on oeis4.)