A342727 Digitally balanced numbers in base i-1: numbers that in base i-1 have the same number of 0's as 1's.
2, 21, 26, 31, 36, 41, 46, 51, 310, 315, 325, 330, 335, 340, 345, 350, 355, 360, 365, 370, 375, 390, 395, 405, 410, 415, 420, 425, 430, 435, 455, 470, 475, 485, 490, 495, 535, 550, 555, 565, 570, 575, 580, 585, 590, 595, 600, 605, 610, 620, 625, 630, 635, 645
Offset: 1
Examples
2 is a term since its representation in base i-1, 1100, has 2 0's and 2 1's. 21 is a term since its representation in base i-1, 110011010001, has 6 0's and 6 1's.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- Walter Penney, A "binary" system for complex numbers, Journal of the ACM, Vol. 12, No. 2 (1965), pp. 247-248.
Crossrefs
Programs
-
Mathematica
v = {{0, 0, 0, 0}, {0, 0, 0, 1}, {1, 1, 0, 0}, {1, 1, 0, 1}}; balQ[n_] := Plus @@ (d = IntegerDigits[n]) == Length[d]/2; q[n_] := balQ @ FromDigits[Flatten@v[[1 + Reverse @ Most[Mod[NestWhileList[(# - Mod[#, 4])/-4 &, n, # != 0 &], 4]]]]]; Select[Range[1000], q]