A071925 Digitally balanced numbers: binary numbers which have the same number of 0's as 1's; decimal representation: A031443.
10, 1001, 1010, 1100, 100011, 100101, 100110, 101001, 101010, 101100, 110001, 110010, 110100, 111000, 10000111, 10001011, 10001101, 10001110, 10010011, 10010101, 10010110, 10011001, 10011010, 10011100, 10100011
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..2000
Programs
-
Mathematica
Select[FromDigits/@Tuples[{0,1},8],DigitCount[#,10,1]==DigitCount[#,10,0]&] (* Harvey P. Dale, Sep 08 2024 *)
-
Python
from itertools import islice, count from sympy.utilities.iterables import multiset_permutations def A071925gen(): # generator of terms for n in count(1): yield from (int('1'+''.join(p)) for p in multiset_permutations('0'*n+'1'*(n-1))) A071925_list = list(islice(A071925gen(),30)) # Chai Wah Wu, Dec 06 2021
Comments