Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The classic prime joke (saw it originally in Sci Am back in the ... 70's? 80's?). Found an approximation when I googled it:

A mathematician, physicist, and engineer are taking a math test. One question asks "Are all odd numbers prime?"

The mathematician thinks, "3 is prime, 5 is prime, 7 is prime, 9 is not prime -- nope, not all odd numbers are prime."

The physicist thinks, "3 is prime, 5 is prime, 7 is prime, 9 ... experimental error, 11 is prime, 13 is prime, yes, they're all prime."

The engineer thinks, "3 is prime, 5 is prime, 7 is prime, 9 is prime, 11 is prime, ..."



Amazon thinks, "music is Prime, video is Prime, pantry is Prime, day is Prime, ..."


Optimus is Prime...


E-prime has the prime property...


Bezos Prime


Yes, and the programmer thinks: "3 is prime, 5 is prime, 7 is prime, 9 is not prime, 9 is not prime, 9 is not prime, …"


> The engineer thinks, "3 is prime, 5 is prime, 7 is prime, 9 is prime, 11 is prime, ..."

Surely the engineer would round it to the nearest power of ten and thus discount all of the numbers?


Help with the joke? I understood the mathematician and the physicist, but not the engineer. What stereotype is being invoked?


Pretty sure it's just mathematicians and physicists dumping on engineers. ;-)


Cause engineers are bad at math because you don’t really need to be good at math to write good code.


9 is a prime the same way that 1/0 is +Inf.


The version I remember has the mathematician thinking: "3 is prime, 5 is prime, 7 is prime, so by mathematical induction, all odd numbers are prime".


It just occurred to me how strange it is that you can get to some numbers by addition that you cannot get to by multiplying any subset of the earlier sequence. Emotionally, it feels like addition and multiplication are arguing over who's better, and multiplication is like "I'm so fast", and addition is like, "I'm slow but, I can go places you can't".

It'd be cool, if there was a Maker, that they make it so that some very large prime number is a message to all intelligent life capable of computing and deciphering it. This kind of message would penetrate even nested, simulated universes, and could only come from World 0, assuming the properties of numbers are independent of physical constants. Why not have a SETI-in-the-primes project, after all?


> It'd be cool, if there was a Maker, that they make it so that some very large prime number is a message to all intelligent life capable of computing and deciphering it

Every possible message is already there. Just like how Borges’ Library of Babel contains every possible book (within its limits of size and format)


> Just like how Borges’ Library of Babel contains every possible book (within its limits of size and format)

You're welcome to look around for messages here: https://libraryofbabel.info/

I don't know if anyone has ever found one, though.


That cannot be true. It does not contain the message '4'. (Or any of the non-primes.)

In fact it seems like there must be many more non-primes than primes over any finite interval (for the simple reason that multiplication gets a lot of whacks at the piñata, e.g. producing a product landing in that finite interval.)

So to answer your implied question ("why bother commucating with primes anwyay?") I guess the value of limiting your message to "a really big prime number" is to make discovery hard, but still tenable. It should be pretty big, like big enough for a good bible sized book, say 1 gigabyte, and start with something really obviously artificial, or unexpected looking, like starting as a 1 with 20,000 zeroes, or maybe better, 20k perfect 010101 and then after a few thousand, 00110011, and from there establish a language protocol, and write the book. But you'd have to expect people to check only primes for these simple patterns, because it's really easy to produce meaningful sequences with addition, and really hard with multiplication (AFAIK).


> That cannot be true. It does not contain the message '4'. (Or any of the non-primes.)

Any finite message (containing a finite number of symbols drawn from a finite alphabet) can be represented as a positive integer.

Any positive integer n can be encoded in a prime, even a composite integer.

Use the following encoding system: write 1 n times, followed by a zero, followed by an arbitrary bit string.

For example, for 4: 11110xxxxxxxxxxxxx...

Using that encoding system, there will be an infinite number of primes that encode 4 - all the primes which start with 11110 in binary.

Thus, the set of all primes contains an infinite number of copies of every possible finite message.


I meant that the entire message is "4", not just part of the message. Obviously we can pick a subset of digits of any large prime and find anything we want. However, the odds of a very large prime (like a gigabyte) looking intentionally ordered over its entire length seems vanishingly small.

The only reason to limit ourselves to primes is because its trivial to produce a meaningful composite, and very difficult to produce a meaningful prime. Take this message; if I was to associate it with a number (say by joining its characters as 7-bit ASCII), my money is that it's composite. (Not sure what the odds are, but I'd take 100:1 odds).

EDIT: period is `01110`, which is even, so I win.


> However, the odds of a very large prime (like a gigabyte) looking intentionally ordered over its entire length seems vanishingly small.

Can we estimate how many gigabyte sized primes exist? I think one can do that using the prime number theorem. Let’s call that N. What is the probability one of those N messages is meaningful? I think it is a lot higher than you think it is. I think N is a very big number, even though it is very small compared to the number of composite gigabyte-sized numbers, it is still unimaginably large in absolute terms.


PNT, interesting! If I'm reading it correctly you can estimate the number of N digit primes as 10^N/N. That's basically 10^N, and for N=9 (a billion), that means there's (very very roughly) a billion primes with a billion digits.

I mean, it's not that many if your expecting a message from God (I say half-jokingly).


Suppose somewhere out there, there is an ISO of Bible software, and it just so happens that when expressed as an integer it turns out to be prime – proof that the Bible is God's word, or freak coincidence? I think most people would go with the second option. And, the same would be just as true if it was an ISO of some other religious scripture, such as the Quran or the Vedas.


Well it would be an impressive feat, regardless. But of course there are a lot of degrees-of-freedom if you were to attempt this. Tiny formatting and encoding decisions would all greatly influence the resulting integer. Because it's so sensitive to chosen input, I would say even if you managed to produce a prime, it's not very satisfying as a sort of Godly checksum and signature.

Much more interesting is to discover a new communication, a message encoded in a very large number that is distinguished by being prime. (What message would you send? It would be interesting if it ultimately described some sort of recursive, reactive automata, the source code for a kind of learning, communicating intelligence. A gift, then. An awesome, terrible gift.)


> Why not have a SETI-in-the-primes project, after all?

Sure, it can run alongside SETI-in-the-burn-marks-on-toast and SETI-the-flour-spilled-on-the-table projects.


Ah, but that's not quite the same. A message encoded in number theory itself is a far more difficult to author than just adjusting the position of 10^23 atoms.


Then it shouldn't take nearly as long!


That's extrapolation I suppose, but not induction. For induction you'd need to say '1 is prime, n+2 is prime where n is prime, so [...]'.


Yes, I know. It's a joke. Making fun of mathematicians, physicists and engineers.


that's not mathematical induction though. it's what philosophers call "induction", i.e. building theories out of empirical observations (as opposed to deduction; mathematical induction is weirdly named because it's actually purely deductive)


You heard that in your engineering course.....


Surely the mathematician would think “if all odd numbers were prime then the Riemann hypothesis would be trivially false, so obviously they cannot be”.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: