Simon has tried Matt Parker’s multiplicative persistence challenge on Numberphile: by multiplying all the digits in a large number, looking for the number of steps it takes to bring that large number to a single digit. Are there numbers that require 12 steps (have the multiplicative persistence of 12)?
Simon has worked on this for two days, creating an interface in Wolfram Mathematica. He wrote the code to make the beautiful floral shapes above, they are actually graphs of how many steps three digit numbers take to get to single digit numbers (each ”flower” has the end result at its center).
What about the numbers with many more digits than three? Simon has tried writing code to look for the multiplicative persistence of really large numbers and also came up with some efficiencies, i.e. shortcuts in the search process. He did manage to find the persistence for 2^233 (the persistence was 2):
However after he applied one of his efficiencies to the code to be able to search through many numbers at once, the code didn’t run anymore. You can read Simon’s page about this project and see his code here:
277777788888899 is the smallest number with a persistence of 11.
The largest known is 77777733332222222222222222222:
This code works with a few efficiencies:
1. They’ve already checked up to 10^233, so we don’t have to check those again.
2. We can rearrange the digits, and the multiplication will be the same. So we don’t have to check any of the rearrangements of any of the numbers we’ve already checked.
3a. We should never put in a 0 (a digit of the number). Because then you would be multiplying by 0, which would result in 0 in 1 step!
3b. We should also never put in a 5 and an even number. Because, in the next step, the number would be divisible both by 5 and by 2, so it’s also divisible by 10. That would put a 0 in the answer, which we saw we should never do!
3c. With similar reasoning (assuming we want to find the smallest number of the type we want), we’ll see we should never put in:
– Two 5s
– A 5 and a 7
– When we put in a… (- means anything, the order doesn’t matter):
1,- , remove the 1
2,2, put 4 instead
2,3, put 6 instead
2,4, put 8 instead
3,3, put 9 instead
So, we can reduce the search space and time collossaly, with just some logic!