Fabulous Adventures In Coding
Eric Lippert is a principal developer on the C# compiler team. Learn more about Eric.
I got a question recently about where in the .NET framework the "special numbers" were defined. The questioner was actually asking about the Double.NaN, Double.PositiveInfinity, etc, special values for floating point numbers. Of course there are other "special numbers" defined by the framework, such as Math.PI.
The question was easily answered but it got me thinking, which, as we know, is usually trouble.
Clearly zero is a very special number, being the first natural number.
One is pretty special too, being the multiplicative identity.
Two is the only even prime.
Three is the lowest odd prime...
Clearly lots of numbers are special. This led me to propose the following theorem:
Theorem: Every natural number (0, 1, 2, ...) is a special number.
Let’s posit that the set of nonspecial natural numbers is nonempty, and deduce a contradiction.
If there exists a nonspecial natural number then there must be a lowest nonspecial natural number.
What an unusual property! The lowest nonspecial natural number!
Whatever number has that unusual property must be kinda... special.
Therefore the lowest nonspecial natural number is special.
Therefore, if the set of nonspecial natural numbers is nonempty then it contains a special number.
That is clearly nonsensical, therefore the set of nonspecial natural numbers is empty.
Therefore all natural numbers are special, QED.
And yet I can't find anything special about 7920687935872092847630945767548023. But it must be special somehow!
Extending the proof show that all real numbers are special is left as an exercise for the reader.
Forget set theory and try common sense. If all numbers are equally special then no numbers are special. That said, Euler believed that the equation e^i(pi) -1 = 0 proved the existence of god since it related these special numbers in a simple elegant way that implied a creator. And don't forget that Pythagoras led a cult of ancient Greek's who worshiped numbers. The numbers to them were beyond special, they were gods!
Hey, you're the first person to mention "equally special". No one has made the claim that all numbers are equally special, just that all numbers are special. Some might be more special than others.
We do know however that there is no number with the least specialness. Why? Because "the number with the least specialness" is a pretty special property, so it is likely more special than some other number, which is a contradiction. There may be a _most_ special number though.
That reminds of this site listing (some of the) special numbers:
I haven't seen it for years, but the number "google" (sic) helped find it right away.
Well, it contains no "1"s. The odds of that for an n-digit number are 1/(10^n). I get 1/(10^34) for this case. Is that special?
Perhaps not. There are 9^34 thirty-four-digit numbers that have the same property. Or maybe they're all special!
Also this number contains 3 or more instances of each of the other 9 digits.
(4 0s, 0 1s, 4 2s, 3 3s, 3 4s, 3 5s, 3 6s, 6 7s, 4 8s, 4 9s)
Ah, yes. It's the first number published as possibly non-special by the "great mathemetician" Eric Lippert! :)
The odds for an n-digit number, not to contain any "1" is 0.9^n, so in this case it is 0.9^34 which is 0.0278 . Not soooo special after all...
Well clearly two numbers can't both by the smallest uninteresting numbers at the same time, so once you define, say, 7920687935872092847630945767548023 as the lowest uninteresting number, you *don't* preclude the next smallest uninteresting numbers without invoking paradoxes like those in set theory
It's odd that you don't mention in your blog post that this is an "old thing".
This reminds me of Zeno's famous paradox, where he 'proved' (by contradiction) that Achilles would not be able to pass a tortoise that had a head start in a race:
"In a race, the quickest runner can never overtake the slowest, since the pursuer must first reach the point whence the pursued started, so that the slower must always hold a lead."
I suppose being the smallest non-special number is similar to being the tortoise.
Three words for you... <a href="http://www.amazon.com/G%F6del-Escher-Bach-Eternal-Golden/dp/0465026567">Gödel, Escher, Bach</a>.
The SMALLEST non-special number might be considered special, but I wouldn't then MOVE it to the set of special numbers, and then declare the (originally) second-smallest non-special number to be special. It's not.
Although I do understand the theory of induction from a mathematical point of view, from a commonsense point of view, there can be a smallest non-special number... but only one!
A book that my Mom co-authored (Mathematics for the liberal arts student) had the following anecdote:
Fred flipped a coin 20 times, and got the sequence HTTHHTHTHTTTHHHTHHHT.
He then calculated the odds that that specific sequence would have happened; those odds were amazingly low.
He concluded that a miracle just happened, and switched his major to Theology.
If any number out of the set of all numbers goes missing, such event will have the gods promptly investigate who had stolen it.
If you like special numbers visit: http://www.archimedes-lab.org/numbers/Num1_69.html
Forget set theory and try common sense. If all numbers are equally special then no numbers are special.
I am going to say almost the same thing. We are indeed discussing a paradox just like this, 'this statement is incorrect'. If every number is special, then, there is nothing special about any number. If no number is special, the lowest number is special because it is the lowest member from the set of numbers which are not special.
Why not think like a Microsoft guy and have the .NET team include Math.EvenPrimeNumber, Math.FirstOddPrimeNumber, etc...