5 ms·
Somewhat interesting, 123456789 * 8 is 987654312 (the last two digits are swapped). This holds for other bases as well: 0x123456789ABCDEF * 14 is 0xFEDCBA987654
by Joker_vD 1y ago
Somewhat interesting, 123456789 * 8 is 987654312 (the last two digits are swapped). This holds for other bases as well: 0x123456789ABCDEF * 14 is 0xFEDCBA987654312.
Also, adding 123456789 to itself eight times on an abacus is a nice exercise, and it's easy to visually control the end result.
- andyjansson 1y agoAnother interesting thing is that these seem to work: base 16: 123456789ABCDEF~16 * (16-2) + 16 - 1 = FEDCBA987654321~16 base 10: 123456789~10 * (10-2) + 10 - 1 = 987654321~10 base 9: 12345678~9 * (9-2) + 9 - 1 = 87654321~9 base 8: 1234567~8 * (8-2) + 8 - 1 = 7654321~8 base 7: 123456~7 * (7-2) + 7 - 1 = 654321~7 base 6: 12345~6 * (6-2) + 6 - 1 = 54321~6 and so on.. or more generally: base n: sequence * (n - 2) + n - 1
- madcaptenor 1y agoThis is in the original post, in the form num(b)/denom(b) = b - 2 + (b-1)/denom(b) so you just need to clear the denominator.
- monkpit 1y ago> the last 2 digits are swapped They are also +9 away from being in order. And then 12345678 * 8 is 98765424 which is +9 away from also being in order.
- monkpit 1y agoOops - the second one was supposed to say +8
- mechanicalpulse 1y agoI also went about looking at the difference rather than the order. In the hexadecimal case, the difference is 15 (0xEF vs 0x12). I thought, then, that for any base B with ascending digits A and descending digits D, (D-(B-1))/A=B-2. For binary, it looks like (1-(b-1))/1=b-10 or (1-(2-1))/1=2-2=0 in decimal. For trinary, it looks like (21-(b-1))/12=b-2 or (7-(3-1))/5=5/5=1 in decimal. For quaternary, it looks like (321-(b-1))/123=b-2 or (57-(4-1))/27=54/27=2 in decimal. Essentially and perhaps unsurprisingly, the size of the slices in the number pie get smaller the bigger the pie gets. In binary, the slice is the pie, which is why the division comes out to zero there.
- debtta 1y agoOn an 8 digit calculator the common variant of this was 12345679 * 8 = 98765432