Elektrine lite

← Feed

@rnd@toot.cat

Post #1098414

2026-03-31 10:04 UTC

@jim_easterbrook@mstdn.social @simontatham@hachyderm.io also wonder how it would deal with a number like 536870912, which in decimal is very flat (every digit, except 4, appears once), but is a spiky 0x20000000 in hexadecimal my solution: hexadecimal by default, with a predetermined list of "interesting" numbers that should be displayed in decimal (0, 1, 1/2/2.5/3/4/5/7.5 * powers of 10, all-nines, first digits of pi, repeating decimal digits, 12345.., 8675309, etc.)

Replies (2)

  • @simontatham@hachyderm.io 2026-03-31 10:08

    @rnd@toot.cat @jim_easterbrook@mstdn.social good example! A friend of mine teaches university-level mathematics, and has been known to set the question "2^29 is a number with 9 distinct decimal digits. Which digit is missing?" and the challenge is to answer it using first-year number theory results without just calculating what the number actually looks like. As a lifelong low-level programmer, I have all the powers of 2 up to 2^32 solidly memorised, so when he mentioned that question, I didn't _have_ to calculate – I recited "536870912" straight off the top of my head, and (from practice on Sudoku) also immediately knew 4 was the digit I hadn't seen. But I'd never _noticed_, even when memorising that number, that it had nine distinct digits. I recited it out loud and then said "oh yeah! I never noticed that before!"

    Open ##1098408

  • @rnd @jim_easterbrook @simontatham the peaky digit histogram sounds useful. The flat histogram seems like where it falls over. I wonder if you could combine this with something like the DCT of the digits and look for peakiness in the spectrum? Maybe that would work for numbers where the digits follow a pattern.

    Open ##1887863