# The Viscount of Bi-Count

Today is 22/2/22 and, as I hoped on 2/2/22, I can say more about an interesting little palindromic-pattern problem. For each set of integers <= 1[0]1 in base 10, I looked at the count of palindromes exactly divisible by 1, 2, 3, 4, 5, 6, 7, 8 and 9. For example, 2, 4, 6 and 8 are the 4 palindromes divisible by 2 that are less than 11, so countdiv(2) = 4 for pal <= 11; 3, 6 and 9 are the 3 palindromes divisible by 3, so countdiv(3) = 3; and so on. Here are the counts — and some interesting patterns — for palindromes <= (powers-of-10 + 1) up to 1,000,000,000,001:

count for palindromes <= 101 (prime)

countdiv(1) = 19
countdiv(2) = 8
countdiv(3) = 6
countdiv(4) = 4
countdiv(5) = 2
countdiv(6) = 2
countdiv(7) = 2
countdiv(8) = 2
countdiv(9) = 2

count for palindromes <= 1001 = 7 * 11 * 13

countdiv(1) = 109
countdiv(2) = 48
countdiv(3) = 36
countdiv(4) = 24
countdiv(5) = 12
countdiv(6) = 15
countdiv(7) = 15
countdiv(8) = 12
countdiv(9) = 12

count for palindromes <= 10001 = 73 * 137

countdiv(1) = 199
countdiv(2) = 88
countdiv(3) = 66
countdiv(4) = 44
countdiv(5) = 22
countdiv(6) = 28
countdiv(7) = 32
countdiv(8) = 22
countdiv(9) = 22

count for palindromes <= 100001 = 11 * 9091

countdiv(1) = 1099
countdiv(2) = 488
countdiv(3) = 366
countdiv(4) = 244
countdiv(5) = 122
countdiv(6) = 161
countdiv(7) = 163
countdiv(8) = 122
countdiv(9) = 122

count for palindromes <= 1000001 = 101 * 9901

countdiv(1) = 1999
countdiv(2) = 888
countdiv(3) = 666
countdiv(4) = 444
countdiv(5) = 222
countdiv(6) = 294
countdiv(7) = 303
countdiv(8) = 222
countdiv(9) = 222

count for palindromes <= 10000001 = 11 * 909091

countdiv(1) = 10999
countdiv(2) = 4888
countdiv(3) = 3666
countdiv(4) = 2444
countdiv(5) = 1222
countdiv(6) = 1627
countdiv(7) = 1588
countdiv(8) = 1222
countdiv(9) = 1222

count for palindromes <= 100000001 = 17 * 5882353

countdiv(1) = 19999
countdiv(2) = 8888
countdiv(3) = 6666
countdiv(4) = 4444
countdiv(5) = 2222
countdiv(6) = 2960
countdiv(7) = 2878
countdiv(8) = 2222
countdiv(9) = 2222

count for palindromes <= 1000000001 = 7 * 11 * 13 * 19 * 52579

countdiv(1) = 109999
countdiv(2) = 48888
countdiv(3) = 36666
countdiv(4) = 24444
countdiv(5) = 12222
countdiv(6) = 16293
countdiv(7) = 15734
countdiv(8) = 12222
countdiv(9) = 12222

count for palindromes <= 10000000001 = 101 * 3541 * 27961

countdiv(1) = 199999
countdiv(2) = 88888
countdiv(3) = 66666
countdiv(4) = 44444
countdiv(5) = 22222
countdiv(6) = 29626
countdiv(7) = 28783
countdiv(8) = 22222
countdiv(9) = 22222

count for palindromes <= 100000000001 = 11^2 * 23 * 4093 * 8779

countdiv(1) = 1099999
countdiv(2) = 488888
countdiv(3) = 366666
countdiv(4) = 244444
countdiv(5) = 122222
countdiv(6) = 162959
countdiv(7) = 157361
countdiv(8) = 122222
countdiv(9) = 122222

count for palindromes <= 1000000000001 = 73 * 137 * 99990001

countdiv(1) = 1999999
countdiv(2) = 888888
countdiv(3) = 666666
countdiv(4) = 444444
countdiv(5) = 222222
countdiv(6) = 296292
countdiv(7) = 286461
countdiv(8) = 222222
countdiv(9) = 222222

As you can see, the counts for some numbers alternate between rep-digits (all digits the same) and nearly rep-digits. For example, the counts for palindromes exactly divisible by 5, 8 and 9 are alternately all 2s or 1 followed by all 2s. And you get counts of 2, 12, 22, 122, 222, 1222, 2222 in other even bases greater than base 2 when the counts are represented in that base. Here’s base 8:

count for palindromes <= 101 in b8 = 65 in b10 = 5 * 13

countdiv(1) = 17 in b8 (15 in b10)
countdiv(2) = 6
countdiv(3) = 11 in b8 (9)
countdiv(4) = 2
countdiv(5) = 3
countdiv(6) = 4
countdiv(7) = 2

count for palindromes <= 1001 in b8 = 513 in b10 = 3^3 * 19

countdiv(1) = 107 in b8 (71 in b10)
countdiv(2) = 36 in b8 (30)
countdiv(3) = 34 in b8 (28)
countdiv(4) = 12 in b8 (10)
countdiv(5) = 20 in b8 (16)
countdiv(6) = 14 in b8 (12)
countdiv(7) = 12 in b8 (10)

count for palindromes <= 10001 in b8 = 4097 in b10 = 17 * 241

countdiv(1) = 177 in b8 (127 in b10)
countdiv(2) = 66 in b8 (54)
countdiv(3) = 123 in b8 (83)
countdiv(4) = 22 in b8 (18)
countdiv(5) = 34 in b8 (28)
countdiv(6) = 44 in b8 (36)
countdiv(7) = 22 in b8 (18)

count for palindromes <= 100001 in b8 = 32769 in b10 = 3^2 * 11 * 331

countdiv(1) = 1077 in b8 (575 in b10)
countdiv(2) = 366 in b8 (246)
countdiv(3) = 352 in b8 (234)
countdiv(4) = 122 in b8 (82)
countdiv(5) = 164 in b8 (116)
countdiv(6) = 144 in b8 (100)
countdiv(7) = 122 in b8 (82)

count for palindromes <= 1000001 in b8 = 262145 in b10 = 5 * 13 * 37 * 109

countdiv(1) = 1777 in b8 (1023 in b10)
countdiv(2) = 666 in b8 (438)
countdiv(3) = 1251 in b8 (681)
countdiv(4) = 222 in b8 (146)
countdiv(5) = 316 in b8 (206)
countdiv(6) = 444 in b8 (292)
countdiv(7) = 222 in b8 (146)

count for palindromes <= 10000001 in b8 = 2097153 in b10 = 3^2 * 43 * 5419

countdiv(1) = 10777 in b8 (4607 in b10)
countdiv(2) = 3666 in b8 (1974)
countdiv(3) = 3524 in b8 (1876)
countdiv(4) = 1222 in b8 (658)
countdiv(5) = 1645 in b8 (933)
countdiv(6) = 1444 in b8 (804)
countdiv(7) = 1222 in b8 (658)

count for palindromes <= 100000001 in b8 = 16777217 in b10 = 97 * 257 * 673

countdiv(1) = 17777 in b8 (8191 in b10)
countdiv(2) = 6666 in b8 (3510)
countdiv(3) = 12523 in b8 (5459)
countdiv(4) = 2222 in b8 (1170)
countdiv(5) = 3164 in b8 (1652)
countdiv(6) = 4444 in b8 (2340)
countdiv(7) = 2222 in b8 (1170)

The counts for 4-palindromes and 7-palindromes in base 8 run: 1, 12, 22, 122, 222, 1222, 2222…, just like the counts for 5-palindromes, 8-palindromes and 9-palindromes in base 10. Here’s base 14:

count for palindromes <= 101 in b14 = 197 in b10 (prime)

countdiv(1) = 1D in b14 (27 in b10)
countdiv(2) = C in b14 (12)
countdiv(3) = 13 in b14 (17)
countdiv(4) = 6
countdiv(5) = 11 in b14 (15)
countdiv(6) = 8
countdiv(7) = 2
countdiv(8) = 2
countdiv(9) = 5
countdiv(A) = 7
countdiv(B) = 2
countdiv(C) = 4
countdiv(D) = 2

count for palindromes <= 1001 in b14 = 2745 in b10 = 3^2 * 5 * 61

countdiv(1) = 10D in b14 (209 in b10)
countdiv(2) = 6C in b14 (96)
countdiv(3) = 58 in b14 (78)
countdiv(4) = 36 in b14 (48)
countdiv(5) = 3A in b14 (52)
countdiv(6) = 28 in b14 (36)
countdiv(7) = 12 in b14 (16)
countdiv(8) = 19 in b14 (23)
countdiv(9) = 1C in b14 (26)
countdiv(A) = 19 in b14 (23)
countdiv(B) = 14 in b14 (18)
countdiv(C) = 14 in b14 (18)
countdiv(D) = 12 in b14 (16)

count for palindromes <= 10001 in b14 = 38417 in b10 = 41 * 937

countdiv(1) = 1DD in b14 (391 in b10)
countdiv(2) = CC in b14 (180)
countdiv(3) = 147 in b14 (259)
countdiv(4) = 66 in b14 (90)
countdiv(5) = 129 in b14 (233)
countdiv(6) = 88 in b14 (120)
countdiv(7) = 22 in b14 (30)
countdiv(8) = 31 in b14 (43)
countdiv(9) = 66 in b14 (90)
countdiv(A) = 79 in b14 (107)
countdiv(B) = 26 in b14 (34)
countdiv(C) = 44 in b14 (60)
countdiv(D) = 22 in b14 (30)

count for palindromes <= 100001 in b14 = 537825 in b10 = 3 * 5^2 * 71 * 101

countdiv(1) = 10DD in b14 (2939 in b10)
countdiv(2) = 6CC in b14 (1356)
countdiv(3) = 594 in b14 (1110)
countdiv(4) = 366 in b14 (678)
countdiv(5) = 3B2 in b14 (744)
countdiv(6) = 288 in b14 (512)
countdiv(7) = 122 in b14 (226)
countdiv(8) = 1A1 in b14 (337)
countdiv(9) = 1CA in b14 (374)
countdiv(A) = 1A7 in b14 (343)
countdiv(B) = 150 in b14 (266)
countdiv(C) = 144 in b14 (256)
countdiv(D) = 122 in b14 (226)

count for palindromes <= 1000001 in b14 = 7529537 in b10 = 37 * 197 * 1033

countdiv(1) = 1DDD in b14 (5487 in b10)
countdiv(2) = CCC in b14 (2532)
countdiv(3) = 1493 in b14 (3657)
countdiv(4) = 666 in b14 (1266)
countdiv(5) = 12B1 in b14 (3291)
countdiv(6) = 888 in b14 (1688)
countdiv(7) = 222 in b14 (422)
countdiv(8) = 331 in b14 (631)
countdiv(9) = 63A in b14 (1228)
countdiv(A) = 7A7 in b14 (1519)
countdiv(B) = 278 in b14 (498)
countdiv(C) = 444 in b14 (844)
countdiv(D) = 222 in b14 (422)

count for palindromes <= 10000001 in b14 = 105413505 in b10 = 3 * 5 * 7027567

countdiv(1) = 10DDD in b14 (41159 in b10)
countdiv(2) = 6CCC in b14 (18996)
countdiv(3) = 5948 in b14 (15548)
countdiv(4) = 3666 in b14 (9498)
countdiv(5) = 3B2A in b14 (10426)
countdiv(6) = 2888 in b14 (7176)
countdiv(7) = 1222 in b14 (3166)
countdiv(8) = 1A31 in b14 (4747)
countdiv(9) = 1C6D in b14 (5193)
countdiv(A) = 1A79 in b14 (4811)
countdiv(B) = 1513 in b14 (3741)
countdiv(C) = 1444 in b14 (3588)
countdiv(D) = 1222 in b14 (3166)

count for palindromes <= 100000001 in b14 = 1475789057 in b10 = 17 * 5393 * 16097

countdiv(1) = 1DDDD in b14 (76831 in b10)
countdiv(2) = CCCC in b14 (35460)
countdiv(3) = 14947 in b14 (51219)
countdiv(4) = 6666 in b14 (17730)
countdiv(5) = 12B29 in b14 (46097)
countdiv(6) = 8888 in b14 (23640)
countdiv(7) = 2222 in b14 (5910)
countdiv(8) = 3331 in b14 (8863)
countdiv(9) = 631D in b14 (17079)
countdiv(A) = 7A79 in b14 (21275)
countdiv(B) = 278B in b14 (6983)
countdiv(C) = 4444 in b14 (11820)
countdiv(D) = 2222 in b14 (5910)

Now 7-palindromes and D-palindromes (D = 13 in base 10) are following the [1]2222… pattern. What explains it? If you’re good at math, you won’t need telling. But I’m not good at maths, so I’m going to tell myself and other members of the not-good-at-math community what’s going on. Let’s go back to base 10 and the counts for 5-palindromes, that is, palindromes exactly divisible by 5. In base 10, the only integers exactly divisible by 5 have to end in either 5 or 0. But a palindrome can’t end in 0, because then the leading digit would have to be 0 too. Therefore only palindromes ending in 5 are exactly divisible by 5 in base 10. And if the palindromes end in 5, they have to start with 5 too.

Once we know that, we can easily calculate, for a given number of digits, how many 5-palindromes there are. Take 5-palindromes with three digits. If the three-digit 5-palindromes end and start with 5, we have to consider only the middle digit, which can obviously range from 0 to 9: 505, 515, 525, 535, 545, 555, 565, 575, 585 and 595. So there are 10 3-digit 5-palindromes. We add that count to the count for the single one-digit 5-palindrome, 5, and the single two-digit 5-palindrome, 55. So the cumulative count for 5-palindromes < 1001 is: 10 + 1 + 1 = 12.

Now look at four-digit 5-palindromes. They start and end with 5, therefore we have to consider only the middle two digits. And those middle digits have to be identical: 5005, 5115, 5225, 5335, 5445, 5555, 5665, 5775, 5885, 5995. So there are also 10 four-digit 5-palindromes and count of 5-palindromes < 10001 is: 10 + 10 + 1 + 1 = 22.

Now look at five-digit 5-palindromes. Again we have consider only the middle digits, because the first and fifth digits have to be 5. The second digit of a five-digit 5-palindrome has to be the same as the fourth digit: 50005, 51715, 52425, 53135, and so on. And the second and fourth digits can obviously range from 0 to 9. And so can the third and middle digit of the 5-palindromes. But the third digit doesn’t have to be the same as the second and fourth digits: 50005, 50105, 50205, and so on. Therefore the number of five-digit 5-palindromes is 10 * 10 = 100. And the count of 5-palindromes < 100001 is: 100 + 10 + 10 + 1 + 1 = 122.

Now look at six-digit 5-palindromes. The second digit of a six-digit 5-palindrome has to be same as the fifth digit and the third digit has to be the same as the fourth digit. So once you have the second and third digits, you automatically have the fourth and fifth digits: 500005, 523325, 587785, and so on. Clearly, the second and third digits range from 00 to 99 (i.e., 00, 01, 02 … 97, 98, 99), so there must be 100 six-digit 6-palindromes. And the count of 5-palindromes < 1000001 is: 100 + 100 + 10 + 10 + 1 + 1 = 222.

It should be clear, then, that the count of 5-palindromes for an odd number of digits, d, will be always the same as the count of 5-palindromes for the even number of digits d+1. There is 1 one-digit 5-palindrome, namely 5, and 1 two-digit 5-palindrome, namely 55. There are 10 three-digit 5-palindromes, 505 to 595, and 10 four-digit 5-palindromes, 5005 to 5995. Now, the count of 5-palindromes with an odd number of digits, d, will be equal to 10^(d\2), where d\2 = (d-1)/2. And the count for 5-palindromes with the even number of digits d+1 will be the same, 10^(d\2). Therefore the count for both sets of 5-palindromes, d-digit palindromes and (d+1)-digit palindromes, will be 2 * 10^(d\2). And that’s why the cumulative count of 5-palindromes looks the way it does in base 10: 1, 2, 12, 22, 122, 222, 1222, 2222, 12222, 22222…

The same reasoning applies in other even bases greater than base 2. When a palindrome divisible by a particular number has to start and end with the same digit, s, in base b, the middle digits will dictate a count of b^(d\2) for both d-digit s-palindromes and (d+1)-digit s-palindromes. And you’ll get the same cumulative count for s-palindromes in that base: 1, 2, 12, 22, 122, 222, 1222, 2222, 12222, 22222…

Some other patterns in the palindrome-counts can be explained by extending the reasoning given above. For example, if an s-palindrome can begin and end with two possible numbers, you’ll get cumulative counts of 2, 4, 24, 44, 244, 444, 2444, 4444, 24444, 44444 and so on. If the s-palindrome can end with three possible numbers, you’ll get cumulative counts of 3, 6, 36, 66, 366, 666, 3666, 6666, 36666, 66666 and so on.

Post-Performative Post-Scriptum

The discussion above is of very simple mathematics, but that’s the only kind I can cope with. All the same, I’m pleased that I managed to work out why the count of 5-palindromes behaves like that in base 10. So I’ve decided to award myself a title. Remember that the count for 5-palindromes of length d and d+1 is 2 * 10^(d\2), where d is an odd number. And you could say that 2 * 10^(d\2) is a bi-count of 10^(d\2). So I’m calling myself the Viscount of Bi-Count.

# Narcischism

What have bits to do with splits? A lot. Suppose you take the digits 12345, split them in all possible ways, then sum the results, like this:

12345 → (1234 + 5) + (123 + 45) + (123 + 4 + 5) + (12 + 345) + (12 + 34 + 5) + (12 + 3 + 45) + (12 + 3 + 4 + 5) + (1 + 2345) + (1 + 234 + 5) + (1 + 23 + 45) + (1 + 23 + 4 + 5) + (1 + 2 + 345) + (1 + 2 + 34 + 5) + (1 + 2 + 3 + 45) + (1 + 2 + 3 + 4 + 5) = 5175.

That’s a sum in base 10, but base 2 is at work below the surface, because each set of numbers is the answer to a series of binary questions: split or not? There are four possible places to split the digits 12345: after the 1, after the 2, after the 3 and after the 4. In (1 + 2 + 3 + 4 + 5), the binary question “Split or not?” is answered SPLIT every time. In (1234 + 5) and (1 + 2345) it’s answered SPLIT only once.

So the splits are governed by a four-digit binary number ranging from 0001 to 1111. When the binary digit is 1, split; when the binary digit is 0, don’t split. In binary, 0001 to 1111 = 01 to 15 in base 10 = 2^4-1. That’s for a five-digit number, so the four-digit 1234 will have 2^3-1 = 7 sets of sums:

1234 → (123 + 4) + (12 + 34) + (12 + 3 + 4) + (1 + 234) + (1 + 23 + 4) + 110 (1 + 2 + 34) + (1 + 2 + 3 + 4) = 502.

And the six-digit number 123456 will have 2^5-1 = 31 sets of sums. By now, an exciting question may have occurred to some readers. Does any number in base 10 equal the sum of all possible numbers formed by splitting its digits?

The exciting answer is: 0. In other words: No. To see why not, examine a quick way of summing the split-bits of 123,456,789, with nine digits. The long way is to find all possible sets of split-bits. There are 2^8-1 = 255 of them. The quick way is to sum these equations:

1 * 128 + 10 * 64 + 100 * 32 + 1000 * 16 + 10000 * 8 + 100000 * 4 + 1000000 * 2 + 10000000 * 1
2 * 128 + 20 * 64 + 200 * 32 + 2000 * 16 + 20000 * 8 + 200000 * 4 + 2000000 * 2 + 20000000 * 1
3 * 128 + 30 * 64 + 300 * 32 + 3000 * 16 + 30000 * 8 + 300000 * 4 + 3000000 * 3
4 * 128 + 40 * 64 + 400 * 32 + 4000 * 16 + 40000 * 8 + 400000 * 7
5 * 128 + 50 * 64 + 500 * 32 + 5000 * 16 + 50000 * 15
6 * 128 + 60 * 64 + 600 * 32 + 6000 * 31
7 * 128 + 70 * 64 + 700 * 63
8 * 128 + 80 * 127
9 * 255

Sum = 52,322,283.

52,322,283 has eight digits. If you use the same formula for the nine-digit number 999,999,999, the sum is 265,621,761, which has nine digits but is far smaller than 999,999,999. If you adapt the formula for the twenty-digit 19,999,999,999,999,999,999 (starting with 1), the split-bit sum is 16,562,499,999,987,400,705. In base 10, as far as I can see, numbers increase too fast and digit-lengths too slowly for the binary governing the split-sums to keep up. That’s also true in base 9 and base 8:

Num = 18,888,888,888,888,888,888 (b=9)
Sum = 16,714,201,578,038,328,760

Num = 17,777,777,777,777,777,777 (b=8)
Sum = 17,070,707,070,625,000,001

So what about base 7? Do the numbers increase slowly enough and the digit-lengths fast enough for the binary to keep up? The answer is: 1. In base 7, this twenty-digit number is actually smaller than its split-bit sum:

Num = 16,666,666,666,666,666,666 (b=7)
Sum = 20,363,036,303,404,141,363

And if you search below that, you can find a number that is equal to its split-bit sum:

166512 → (1 + 6 + 6 + 5 + 1 + 2) + (16 + 6 + 5 + 1 + 2) + (1 + 66 + 5 + 1 + 2) + (166 + 5 + 1 + 2) + (1 + 6 + 65 + 1 + 2) + (16 + 65 + 1 + 2) + (1 + 665 + 1 + 2) + (1665 + 1 + 2) + (1 + 6 + 6 + 51 + 2) + (16 + 6 + 51 + 2) + (1 + 66 + 51 + 2) + (166 + 51 + 2) + (1 + 6 + 651 + 2) + (16 + 651 + 2) + (1 + 6651 + 2) + (16651 + 2) + (1 + 6 + 6 + 5 + 12) + (16 + 6 + 5 + 12) + (1 + 66 + 5 + 12) + (166 + 5 + 12) + (1 + 6 + 65 + 12) + (16 + 65 + 12) + (1 + 665 + 12) + (1665 + 12) + (1 + 6 + 6 + 512) + (16 + 6 + 512) + (1 + 66 + 512) + (166 + 512) + (1 + 6 + 6512) + (16 + 6512) + (1 + 66512) = 166512[b=7] = 33525[b=10].

So 33525 in base 7 is what might be called a narcischist: it can gaze into the split-bits of its own digits and see itself gazing back. In base 6, 1940 is a narcischist:

12552 → (1 + 2 + 5 + 5 + 2) + (12 + 5 + 5 + 2) + (1 + 25 + 5 + 2) + (125 + 5 + 2) + (1 + 2 + 55 + 2) + (12 + 55 + 2) + (1 + 255 + 2) + (1255 + 2) + (1 + 2 + 5+ 52) + (12 + 5 + 52) + (1 + 25 + 52) + (125 + 52) + (1 + 2 + 552) + (12 + 552) + (1 + 2552) = 12552[b=6] = 1940[b=10].

In base 5, 4074 is a narcischist:

112244 → (1 + 1 + 2 + 2 + 4 + 4) + (11 + 2 + 2 + 4 + 4) + (1 + 12 + 2 + 4 + 4) + (112 + 2 + 4 + 4) + (1 + 1 + 22 + 4 + 4) + (11 + 22 + 4 + 4) + (1 + 122 + 4 + 4) + (1122 + 4 + 4) + (1 + 1 + 2 + 24 + 4) + (11 + 2 + 24 + 4) + (1 + 12 + 24 + 4) + (112 + 24 + 4) + (1 + 1 + 224 + 4) + (11 + 224 + 4) + (1 + 1224 + 4) + (11224 + 4) + (1 + 1 + 2 + 2 + 44) + (11 + 2 + 2 + 44) + (1 + 12 + 2 + 44) + (112 + 2 + 44) + (1 + 1 + 22 + 44) + (11 + 22 + 44) + (1 + 122 + 44) + (1122 + 44) + (1 + 1 + 2 + 244) + (11 + 2 + 244) + (1 + 12 + 244) + (112 + 244) + (1 + 1 + 2244) + (11 + 2244) + (1 + 12244) = 112244[b=5] = 4074.

And in base 4, 27 is:

123 → (1 + 2 + 3) + (12 + 3) + (1 + 23) = 123[b=4] = 27.

And in base 3, 13 and 26 are:

111 → (1 + 1 + 1) + (11 + 1) + (1 + 11) = 111[b=3] = 13.

222 → (2 + 2 + 2) + (22 + 2) + (2 + 22) = 222[b=3] = 26.

There are many more narcischists in all these bases, even if you exclude numbers with zeroes in them, like these in base 4:

1022 → (1 + 0 + 2 + 2) + (10 + 2 + 2) + (1 + 02 + 2) + (102 + 2) + (1 + 0 + 22) + (10 + 22) + (1 + 022) = 1022[b=4] = 74.

1030 → (1 + 0 + 3 + 0) + (10 + 3 + 0) + (1 + 03 + 0) + (103 + 0) + (1 + 0 + 30) + (10 + 30) + (1 + 030) = 1030[b=4] = 76.

1120 → (1 + 1 + 2 + 0) + (11 + 2 + 0) + (1 + 12 + 0) + (112 + 0) + (1 + 1 + 20) + (11 + 20) + (1 + 120) = 1120[b=4] = 88.