Comments on: 3 is an odd prime, 5 is an odd prime, 7 is an odd prime, 9 is a very odd prime...
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime/
Comments on MetaFilter post 3 is an odd prime, 5 is an odd prime, 7 is an odd prime, 9 is a very odd prime...Tue, 10 Jul 2007 06:48:39 -0800Tue, 10 Jul 2007 06:48:39 -0800en-ushttp://blogs.law.harvard.edu/tech/rss603 is an odd prime, 5 is an odd prime, 7 is an odd prime, 9 is a very odd prime...
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime
<a href="http://recursed.blogspot.com/2006/12/prime-game.html">The Prime Game</a> is not really much of a game, but it <i>is</i> a neat & little-known fact about the decimal representation of prime numbers.post:www.metafilter.com,2007:site.62794Tue, 10 Jul 2007 06:34:53 -0800WolfdogdecimaldigitsmathnumbersprimessequencespartialorderBy: yhbc
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758202
"Write down a prime number" also isn't really in the same bar-bet category as, say, "betcha I can drink that shot without touching the glass".comment:www.metafilter.com,2007:site.62794-1758202Tue, 10 Jul 2007 06:48:39 -0800yhbcBy: DU
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758204
Dumb question: Does this reduce the difficulty in determining primality from O(sqrt(N)) to O(log(N))? Wait...it must have already been better than O(sqrt(N)).comment:www.metafilter.com,2007:site.62794-1758204Tue, 10 Jul 2007 06:49:51 -0800DUBy: chunking express
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758205
I don't see why it would, since the number 27 is not prime, but I can turn it into the prime number 2 or the prime number 7. So by itself it'd be a pretty crap primality test.
If you like this sort of thing you should read up on Formal Languages.comment:www.metafilter.com,2007:site.62794-1758205Tue, 10 Jul 2007 06:52:43 -0800chunking expressBy: DU
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758209
d'ohcomment:www.metafilter.com,2007:site.62794-1758209Tue, 10 Jul 2007 06:54:41 -0800DUBy: Wolfdog
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758210
You could use this to show that a number is <i>not</i> prime, as I believe he mentions, but remember if there are <i>d</i> digits in the number then there are 2<sup><i>d</i></sup>-1 subsets of digits you can consider crossing out.comment:www.metafilter.com,2007:site.62794-1758210Tue, 10 Jul 2007 06:56:35 -0800WolfdogBy: Baby_Balrog
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758269
good god that's a boring game.comment:www.metafilter.com,2007:site.62794-1758269Tue, 10 Jul 2007 08:07:02 -0800Baby_BalrogBy: Zephyrial
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758280
Wolfdog's got it - this is only really useful for showing a number is <i>not</i> prime. Still, it's an interesting little slice of mathematics.comment:www.metafilter.com,2007:site.62794-1758280Tue, 10 Jul 2007 08:17:15 -0800ZephyrialBy: Chunder
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758281
"9 is a very odd prime" - really? Hmm, back to school for me then...comment:www.metafilter.com,2007:site.62794-1758281Tue, 10 Jul 2007 08:18:29 -0800ChunderBy: escabeche
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758290
This is adorable.comment:www.metafilter.com,2007:site.62794-1758290Tue, 10 Jul 2007 08:33:45 -0800escabecheBy: dzot
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758324
9 is so odd it's divisible by something other than 1 and itself.comment:www.metafilter.com,2007:site.62794-1758324Tue, 10 Jul 2007 09:08:26 -0800dzotBy: gwint
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758325
Wait, exactly how can this help me cheat in online poker?comment:www.metafilter.com,2007:site.62794-1758325Tue, 10 Jul 2007 09:08:45 -0800gwintBy: McLir
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758383
What a bizarre feature of primes. While I didn't quite understand the mathematical explanation, it sounds like it would work in any base system (not just base ten).comment:www.metafilter.com,2007:site.62794-1758383Tue, 10 Jul 2007 10:04:45 -0800McLirBy: Terminal Verbosity
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758395
English. Science. History. I was really good in all these subjects in school. Only math gave me constant frustration. I don't know why; I suppose my brain isn't wired to accept absolutes ("Well, why <i>can't</i> 2+2=7?") but whatever the cause, I always struggled in math. Every now and then I come across some of the wizardry of that universal language and am awed enough to try and give math another shot, to understand its infrastructure, complexity and beauty. But every time I fail. This is a quirky and interesting bit of mathporn, but I won't be tricked again.comment:www.metafilter.com,2007:site.62794-1758395Tue, 10 Jul 2007 10:15:05 -0800Terminal VerbosityBy: Wolfdog
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758413
<i>("Well, why can't 2+2=7?")</i>
"I'll give you $2 and then another $2. You give me $7 back."
"Deal! This time I <i>might just break even!</i>"comment:www.metafilter.com,2007:site.62794-1758413Tue, 10 Jul 2007 10:29:37 -0800WolfdogBy: quin
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758424
I've never trusted math people. The way they sit there all calculating... watching... assessing you... It's like they are trying to determine if you are divisible, or how much of you they could subtract before you were rendered irrational.
I can't prove this, but I'm willing to bet that every single serial killer who has ever lived was good at math.
*shudders*comment:www.metafilter.com,2007:site.62794-1758424Tue, 10 Jul 2007 10:42:18 -0800quinBy: painquale
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758438
<i>Now, a very neat result about the subsequence partial order is that every pairwise incomparable set is finite.</i>
I totally don't see that. Anyone know the proof?comment:www.metafilter.com,2007:site.62794-1758438Tue, 10 Jul 2007 10:51:37 -0800painqualeBy: vacapinta
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758451
painquale: that's not his result. Its a generalization of Dickson's lemma.comment:www.metafilter.com,2007:site.62794-1758451Tue, 10 Jul 2007 11:00:29 -0800vacapintaBy: Smedleyman
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758494
Seven!
Seven, Seven, bo-beven
Banana-fana fo-feven
Fee-Fi-mo-meven
Seven!
60000049!
60000049, 60000049, bo-60000049
Banana-fana fo- 60000049
Fee-Fi-mo- 60000049
60000049!
Chuck!
(etc.)comment:www.metafilter.com,2007:site.62794-1758494Tue, 10 Jul 2007 11:31:59 -0800SmedleymanBy: Samuel Farrow
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758575
<i>"Subsequence" seems to be the preferred term in North America, but in Europe they call this a "subword".</i>
You goddam crazy Yanks with your liberal use of the English language.comment:www.metafilter.com,2007:site.62794-1758575Tue, 10 Jul 2007 12:35:49 -0800Samuel FarrowBy: Arturus
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758735
<i>What a bizarre feature of primes. While I didn't quite understand the mathematical explanation, it sounds like it would work in any base system (not just base ten).</i>
As I read it, it will work in any base system, but it becomes considerably less powerful in lower bases: I'm pretty sure the minimal set in binary is {1}, so it's pretty unhelpful there.
As you go into higher bases, you increase the size of the minimal set, so it's going to be increasingly harder to calculate with certainty what that is.
And his point at the end is that it's not just primes: it'll work with any set of strings, but it's not always easy to figure out what the minimal set is.comment:www.metafilter.com,2007:site.62794-1758735Tue, 10 Jul 2007 14:34:11 -0800ArturusBy: DevilsAdvocate
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758849
<i>I'm pretty sure the minimal set in binary is {1}, so it's pretty unhelpful there.</i>
Actually, no, since 1 is not prime. The minimal set in binary would be {10, 11}.
Turns out it's fairly easy to show that the 26 numbers he gives are the minimal set for primes in base 10.
Clearly, the one-digit primes (<b>2</b>, <b>3</b>, <b>5</b>, <b>7</b>) must be on the list.
Now, consider what two-digit combinations prime numbers may end with, which have not already been eliminated by the primes we already have on the list. Recall that in base 10, primes of two or more digits must end in 1, 3, 7 or 9. The two-digit combinations are:
01 09 11 19 41 49 61 69 81 89 91 99
Of these, <b>11</b>, <b>19</b>, <b>41</b>, <b>61</b>, and <b>89</b> are primes. Add them to the list.
What three-digit combinations could end prime numbers, that aren't eliminated by the one- or two-digit primes already on our list?
<pre>
001 801 901
009 409 609 909
049 449 649 949
069 469 669 969
081 881 981
091 891 991
099 499 699 999
</pre>
(There's a reason I'm writing them in this format. You'll see.)
Of these, <b>409</b>, <b>449</b>, <b>499</b>, <b>881</b>, and <b>991</b> are prime. Add them to the list.
You might think you could keep going this way, but if you try that you get some that just keep going on forever. You could keep adding zeroes on to the left of the ones we haven't eliminated yet, <i>ad infinitum</i>. Strings that consist entirely of 0s, 6s, and 9s are divisible by three, as well as all subsets thereof (recall that if the sum of the digits of a number are divisible by three, the number itself is divisible by three). Let's split the numbers into those ending with 1, and those ending with 9, and do one more round with each of those as above:
<pre>
0001 8001 9001
0081 9081
0091 8091
0801 9801
0891
0901 8901
0981
</pre>
<b>9001</b> is prime. Add it to the list.
Second, note 0891 and 0981 have no numbers to their right. This means you could keep adding zeroes to the left of these, and you'd have a string of digits which could end a prime number, but since integers don't begin with zeroes, you'd eventually have to add a non-zero digit on the left, and whichever one you chose would allow us to get to one of the ones already on our list. (E.g., if you had 000891 and added an 8 to the left, you'd get 8000891, from which you can strike digits to get 881.)
Likewise, if we took 8091, 8901, 9081, or 9801 one more digit, we'd see the only digit we could add to the left of these and not run into one of the numbers already on our list would be zero. With 8001, you can add a 9 to the left to get 98001 (composite), but add anything else other than zero to the left of that and you get a number from which you can create one already on the list.
Now to the ones ending in 9:
<pre>
0009 6009 9009
0049 6049 9049
0069 6069 9069
0099 6099 9099
0469 6469 9469
0609 6609 9609
0649 6649 9649
0669 4669 6669 9669
0699 6699 9669
0909 6909 9909
0949 6949 9949
0969 6969 9969
0999 6999 9999
</pre>
<b>6469</b>, <b>6949</b>, <b>9049</b>, <b>9649</b>, and <b>9949</b> are prime. Add them to the list.
The fact that the column of numbers starting with "4" is nearly empty is due to the fact that 409, 449, and 499 are already on our list. But if you kept doing this for more and more digits, you'd never quite get rid of it entirely. With each additional digit, you'd get just a single number in the "4" column: 46669, 466669, 4666669, etc.
Turns out that 46*9 (think of "6*" as 0 or more 6s repeated, i.e., as in a regular expression, not as multplication) is always divisible by 7. (Proof of which is left as an exercise for the reader). But 46*9 remains as a possible string of digits with which a prime number can end, so we have to look deeper.
What can we add on the left of 46*9 which might leave it as a string of digits which could end a prime, and not be eliminated by any of the numbers already on our list? Zeroes, of course, but eventually you have to add something other than a zero. Not 4 (449 is already on the list). Not 6 (649 is composite, and 6469 is on the list). 9 works (949 is composite, 9469 is composite), but don't add a second 9 or you run into 9949, already on the list. 94669 is also composite, but <b>946669</b> is prime. Add it to the list, and then we don't need to worry about any longer numbers of the form 946*9.
Now we've gotten rid of that pesky 46*9. (And by extension, all forms of 0*46*9.) The remaining numbers are of two types: those consisting entirely of 0s, 6s, and 9s; and those ending in 49.
Let's take the numbers consisting entirely of 0s, 6s, and 9s first. As long as you keep adding only 0s, 6s, and 9s, the number remains divisible by 3, yet is still a string of digits which could end a prime. But add anything other than 0, 6, or 9, and you get a number we've already covered (keeping in mind that they all end with 9: 19, 2, 3, 409, 46*9, 499, 5, 7, or 89).
Now that we've eliminated some of those pesky potentially-infinite series, we can go back to our old method for the strings of digits ending in 49:
<pre>
00049 60049
00649 60649
00949
06049 66049
06649 66649
</pre>
<b>60649</b> is prime; add it to the list. 00949 has nothing you can add to its left without running into something already on the list, so eliminate it from further consideration.
With 60649 now on the list, all remaining primes to be added to the list must have the form 6+0*49 (let "6+" indicate one or more 6s).
Candidate 6-digit numbers: 600049, 660049, 666049, and <b>666649</b>. The last of these is prime; add it to the list, and note that larger numbers will have to have three or fewer 6s.
Candidate 7-digit numbers: 6000049, 6600049, and 6660049. None of these are prime
Candidate 8-digit numbers: <b>60000049</b>, <b>66000049</b>, and <b>66600049</b>. It so happens that all three are prime. Add them all to our list, and we're done!
<small>(And acknowledgements to the <a href="http://primes.utm.edu/curios/includes/file.php?file=primetest.html">primality test</a> here, without which I never would have been able to do this.</small>comment:www.metafilter.com,2007:site.62794-1758849Tue, 10 Jul 2007 16:11:50 -0800DevilsAdvocateBy: Arturus
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1758883
<i>Actually, no, since 1 is not prime. The minimal set in binary would be {10, 11}.</i>
Right, thanks. Wasn't quite thinking properly there.
Very nice demonstration.comment:www.metafilter.com,2007:site.62794-1758883Tue, 10 Jul 2007 16:34:51 -0800ArturusBy: MiltonRandKalman
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1759103
This game is a lot a fun at parties that I would never go to.comment:www.metafilter.com,2007:site.62794-1759103Tue, 10 Jul 2007 19:04:00 -0800MiltonRandKalmanBy: painquale
http://www.metafilter.com/62794/3-is-an-odd-prime-5-is-an-odd-prime-7-is-an-odd-prime-9-is-a-very-odd-prime#1759408
Ah, great stuff! DevilsAdvocate is awesome.comment:www.metafilter.com,2007:site.62794-1759408Tue, 10 Jul 2007 23:47:39 -0800painquale