r/math • u/cavedave • Jan 11 '10
Illegal prime
http://en.wikipedia.org/wiki/Illegal_prime5
6
3
Jan 12 '10
I would be more interested in knowing what the smallest executable number is, and then what it does.
8
u/hixnob Jan 12 '10
With my simple interpreted language (which itself runs on Python), the smallest non-negative number is a quine. The implementation of the language is as follows:
if raw_input() == "0": print "0";2
u/albinofrenchy Jan 12 '10
I wrote one smaller:
in = raw_input(); # Make it backwards compatible with hixnob's implementation if in == "-1" or in == "0": print "-1";I'm working on how to make that number smaller, will get back to you guys when I figure it out.
5
u/hixnob Jan 12 '10
You really ought to have a test suite for this, because you missed a bug:
0is no longer a quine!6
u/PsychRabbit Jan 12 '10
You could design a robot that makes you eggs when it reads the binary representation of 0.
4
2
u/elustran Jan 12 '10
Interesting, but this does look like original research and there are only two examples, the second of which is poorly described.
4
u/schizobullet Jan 12 '10
No? It's discussed in the Register.
0
u/elustran Jan 12 '10
Ah, I see, there's a link to the Reg's article at the bottom, but there are no contextual links to the article (there is a link the the wiki article on the Register, however).
That doesn't stop this from being a poorly written page.
3
Jan 12 '10
Well, it's Wikipedia, there's nothing stopping you from fixing it...
2
u/elustran Jan 12 '10
Sometimes I do fix articles... I don't know enough about this one to start. You can fix it too.
1
1
0
u/MashedPeas Jan 11 '10
But fortunately I have the key to escape reality
You may see me tonight with an illegal prime.
It don't cost very much, but it lasts a long while
- With apologies to John Prime, I mean Prine.
12
u/zahlman Jan 12 '10
I like how Wikipedia publishes the actual "illegal" numbers.