The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A331216 a(n) is the number of ways to write n = u + v where the binary representations of u and of v have the same number of 0's and the same number of 1's. 3
 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 1, 2, 3, 0, 3, 2, 1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 1, 2, 3, 0, 3, 4, 3, 2, 5, 2, 3, 6, 3, 2, 5, 2, 3, 4, 3, 0, 3, 2, 1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 1, 2, 3, 0, 3, 4, 3, 2, 5, 2, 3, 6, 3, 4, 7, 2, 7, 6, 5 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,12 COMMENTS In other words, a(n) is the number of ways to write n as the sum of two binary anagrams. Leading zeros are ignored. LINKS Rémy Sigrist, Table of n, a(n) for n = 0..16384 Rémy Sigrist, PARI program for A331216 Rémy Sigrist, Scatterplot of (x, y) such that 0 <= x, y <= 2^10 and x and y are binary anagrams (a(n) corresponds to the number of pixels (x, y) such that x+y = n) FORMULA a(2*n) > 0. a(2*n) >= a(n). Apparently, a(3*2^k-1-x) = a(3*2^k-1+x) for any k >= 0 and x = -2^k..2^k. EXAMPLE For n = 22: - we can write 22 as u + v in the following ways:   u   v   bin(u)  bin(v)   --  --  ------  ------   10  12    1010    1100   11  11    1011    1011   12  10    1100    1010 - hence a(22) = 3. PROG (PARI) See Links section. CROSSREFS Cf. A330827 (ternary analog), A331218 (decimal analog). Sequence in context: A095774 A266874 A308343 * A071993 A317754 A317854 Adjacent sequences:  A331213 A331214 A331215 * A331217 A331218 A331219 KEYWORD nonn,base AUTHOR Rémy Sigrist, Jan 12 2020 STATUS approved

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

Last modified August 8 19:29 EDT 2020. Contains 336298 sequences. (Running on oeis4.)