# fourier transform according to Saturday Morning Breakfast Cereal

Although not (yet?) tenured, I decided to implement this transform anyway: see fourier transform. To determine the fouriest transform uniquely, in case of a tie the greatest base wins (this is reasonable because greater values of the base correspond to more compact representations).

If no base can beat the decimal, the fourier transform does not exist. I limited consideration to bases up to 36, because they yield convenient representations using the alphabet 012..xyz.

Some examples:

number fourier transform(s) fouriest
42 does not exist does not exist
2013 43b22, 4bi21, 56047 43b22
13244 4104345 4104345
57885161 (too many to list) 54244025056

The last line is merely the exponent of the latest and greatest Mersenne prime. If you want to transform the number itself, go four it…

The transform may have a practical application. For example, my office phone number 4431487 is a pretty undistinguished number. But it has a unique fourier (hence fouriest) transform 524445347, which is easier to remember. This will come in handy when dialpads become equipped with a number base switch.

I added the line “Input interpreted as …” to give some indication of how JavaScript handles integers out of its $2^{53}$ range. For example, entering 9999999999999999 you will find the the code actually transforms 10000000000000000. This one is handled correctly: the fouriest transform is 2422441203251352401446. But in general, round-off errors may distort the results when the input is large. Do not rely on this code in the situations when the fourierness of a very large number is a matter of life and death.

Open problem: can a number of the form 444…4 have a fourier transform? It is conceivable, though unlikely, that its representation in a base smaller than 10 could have more 4s.

## 2 thoughts on “fourier transform according to Saturday Morning Breakfast Cereal”

1. DC says:

After being linked this by a friend, I coded up a quick application which did something very similar to your Javascript one (in fact, originally I just ported it to Java).
After some more changes and expansions from int to long to BigInteger, I also created a new checker – dedicated to the open problem.
If you’re interested in the result, I assume you can see the email address I’ve supplied (I couldn’t find any way to contact you other than by comment) — send me an email.