OFFSET
1,1
COMMENTS
All the terms are of the form 4*k + 1, where k is a digitally balanced number in base 2. Therefore, there are no 3 consecutive numbers that are digitally balanced in base 2.
The number of terms below 2^k is A079309(floor(k/2)-1) for k > 3.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 4*A031443(n) + 1.
EXAMPLE
9 is a term since the binary representation of 9 is 1001, which contains 2 0's and 2 1's, and the binary representation of 9 + 1 = 10 is 1010, which also contains 2 0's and 2 1's.
MATHEMATICA
digBalQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ@(m = Length@d) && Count[d, 1] == m/2]; Select[Range[2000], digBalQ[#] && digBalQ[# + 1] &]
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Amiram Eldar, Nov 21 2020
STATUS
approved