# The Lines Number: 40 337 956

Given a sum of single digit decimal numbers raised to single digit decimal exponents. Take all the single digit numbers and the single digit exponents, and put them together in the order they appear to form a single, multi-digit number. There exists only one positive sum of this kind so that the answer to the sum equals the resulting multi-digit number:

4^{0} - 3^{3} + 7^{9} - 5^{6} = 40337956

The number was discovered by my geeky friend Glenn T. Lines in December 2005. Unfortunately, Glenn is too lazy to make a description of his own number. Hence, I do it for him. Unfortunately, I'm no good at describing math, so let's revisit the above paragraph, this time visually:

4^0-3^3+7^9-5^6 = 4 0 3 3 7 9 5 6

Cool. How do we know that this is the only number? The proof is a combination of logic and brute force. Let's look at the logic first.

The longest (most digits) possible result for any sum of single
digit numbers raised to single digit exponents, is the positive sum
of 9^{9} terms. Looking at lengths for the sum and the
result, we get the following table:

expression | expr. len. | result | res. len. |
---|---|---|---|

9^{9} |
2 | 387420489 | 9 |

9^{9}+9^{9} |
4 | 774840978 | 9 |

9^{9}+9^{9}+9^{9} |
6 | 1162261467 | 10 |

9^{9}+9^{9}+9^{9}+9^{9} |
8 | 1549681956 | 10 |

9^{9}+9^{9}+9^{9}+9^{9}+9^{9} |
10 | 1937102445 | 10 |

9^{9}+9^{9}+9^{9}+9^{9}+9^{9}+9^{9} |
12 | 2324522934 | 10 |

You can clearly see that for expressions containing 12 digits or more, the longest possible result will be too short to cover the required number of digits. Given that logic, it is sufficient to test all possible combinations of sums shorter than or equal to 10 digits. So Glenn and I wrote two brute force programs independently of each other, and both programs agree that 40337956 is the only possible result. (There's a twin negative version as well.)

Possible uses for this number: Well, eh, plenty. But I'll leave that as an exercise for the valuable reader.