The Fast And The Fouriest

Define the Fouriest Transform of a number nn to be the base-bb representation of nn whose digits contain the most 44's of all representations such that bb is minimized. If you wrote out the Fouriest Transform of all positive integers up to and including 99529952, let NN be the total number of 44's you would count in all of their digits. What are the last three digits of NN?

Details and Assumptions

  • As an explicit example, the Fouriest Transform of 224224 is 13441344 (base-55) which contains 22 fours. Although its base-77 representation, 440440, also contains 22 fours, 55 is the smaller base.

  • If there does not exists a base bb that nn can be represented in that has any fours, define the Fouriest Transform of that number nn to be its base-1010 representation.

  • This problem was inspired by the following Saturday Morning Breakfast Cereal Cartoon.


Problem Loading...

Note Loading...

Set Loading...