Consider a positive integer written in base . A sequence is generated from this number by finding the largest digit in the expansion of and writing in base repeating until the base the number is written in can be decreased no further. For example, the sequence generated by in base has length : . Note that the next term in the sequence would be in base again, which is invalid since the base does not decrease.
There exists a single and that generates a sequence with maximal length. Find
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Brute force python: