Jul. 10th, 2023

Once I noticed that 4875 miles equals to 7845 kilometers.
Surprised by this fact, I decided to find other pairs of such kind.
Wrote a script in Ruby like this :
mmm=11*16*10*3*12*254/10 # 1609344 mm in 1 mile
(1000...6213).each{|i|
 mm=i*mmm/1000000 # convert mms into kms, dropping fractional part
 p [i,mm] if i.to_s.chars.sort == mm.to_s.chars.sort
}
Upon running it, I found that there are 14 pairs among 4-digit lengths in miles and kms.
Then I scaled the range up to 10000...62137 and found 43 5-digit permutation pairs which included certain 4-digits originals together with their neighbors. Like,  [1625, 2615] and [1626, 2616] turned into [16247, 26147] and [16248, 26148], and so on. While some other permutations observed for 4-digits had simply disappeared for 5-digits. Like, [1138, 1831].
Then I scaled the range further up to 100000...621371 and found 153 6-digit permutations which brought me back the pair like [113892, 183291] close to the one observed for 4-digits, as well as [4875, 7845] growing to [48741, 78441], [48742, 78442], [48756, 78465] and then to [486937, 783649], [487351, 784315], [487410, 784410], [487411, 784411]

Then I reduced the range down to just 100...621 and found 4 pairs there, that is, [119, 191], [325, 523], [591, 951], [592, 952].
No permutation pairs have been found in even smaller range, 10...62

Probably these sets are worth to be plotted on some kind of 2d logarithmic scale, will try to do that later.

[update:] translated it all into Python and created a Jupyter notebook at https://colab.research.google.com/drive/1eL_lqvNBO1W9_lEGOrphM05SU4rcNu4h with a kind of basic plot, also with a graph connecting shorter and longer numbers with similar mantissas. Please review and suggest your improvements



Profile

Volodymyr Mutel

May 2025

S M T W T F S
    123
45678910
11 121314151617
18192021222324
25262728293031

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 9th, 2025 12:53 am
Powered by Dreamwidth Studios