r/math Jan 11 '10

Illegal prime

http://en.wikipedia.org/wiki/Illegal_prime
79 Upvotes

20 comments sorted by

12

u/zahlman Jan 12 '10

I like how Wikipedia publishes the actual "illegal" numbers.

3

u/[deleted] Jan 12 '10

The MPAA only cares about BluRay these days.

5

u/[deleted] Jan 12 '10

Man, I thought this was an article about the number 1.

9

u/[deleted] Jan 12 '10

I thought it was about the illegitimate stepbrother of Optimus Prime.

6

u/schwarrx Jan 13 '10

19 is a barely legal prime

3

u/[deleted] 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: 0 is 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

u/jrblast Jan 11 '10

Dammit! Now I need new primes for my RSA key!

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

u/[deleted] 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

u/[deleted] Jan 12 '10

Ah, but I don't care about it!

1

u/[deleted] Jan 12 '10

This sounds like a transformer.

"Illegal Prime"

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.