Fun with Prime Numbers
Steve Litt writes "Fun
With Prime Numbers contains a series of prime number finding algorithms starting with the most brute force imaginable, and working up to a paged algorithm capable of finding the first 1,716,050,469 primes in an hour and a half on a commodity machine. There are faster algorithms on the net, but these algorithms are within the reach of mere mortals and are fully explained."
This article will be a prime target for bad jokes.
Mom says my
I got a 404...
"I'll have a Guinness, no wait, make that a Coors Light" -Grad student I work with, who shall remain anonymous...
I find that title so hard to appreciate, maybe I'm just not as big a geek as i thought.
This sounds like one of those topics in high school where if you sounded interested you were written a raincheck for an after school beating by the rugby team.
So the macros knock the time down from 4.49 to 4.15 seconds -- less than a 10% reduction. In my opinion, that's not enough benefit to give up the robustness and typechecking of functions.
I never thought that I'd see a C programmer type something like that.
Why waste disk space with primes instead of just recalculating them?
You don't really have friends do you.
"I use a Mac because I'm just better than you are."
Not among humans. And they are the only ones with phones.
This is why I'm sharing this with the rest of you so that someone can use it.
The Internet is full. Go Away!!!
How about when you're on the vintage mainframe level in Tron 2.0, ask some random program to calculate the seventh even prime number. When he segfaults, you get access to the directory containing Tron Legacy. Just don't ask yourself that question...
If you want to be a true geek, you run factor against all the spare quartz crystals and oscillator blocks in your junkbox, to see which ones factor down to useful frequencies. 'A multiple of 9600 baud, hmmm....'
"What's the frequency Kenneth?"
"One is the loneliest number that you'll ever do Two can be as bad as one, its the loneliest number since the number one"
"Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
My Holloween Costume!
I marked up a sweatshirt with a bunch of random prime numbers and, dum roll please, I WAS the 'Indivisible Man'.
Tada.
~tel0p
The Prime Number Shitting Bear. Watching a console window spit out prime numbers might do it for the geeks, but everyone can loves the prime number shitting bear.
Excuse my ignorance, but what are extremely large primes used for?
Obviously to get a date with a hot chic so you can impress her with the math you know.
Take the cheese to sickbay, the doctor should see it as soon as possible - B'Elanna Torres, "Learning Curve"
Hand in your geek membership card. now.
Why waste time or space?
----
Go canucks, habs, and sens!
How to prove that all odd numbers are prime? Well, this problem has different solutions whether you are a:
usage: prime [-nV] [--quiet] [--silent] [--version] [-e script] --catenate --concatenate | c --create | d --diff --compare | r --append | t --list | u --update | x -extract --get [ --atime-preserve ] [ -b, --block-size N ] [ -B, --read-full-blocks ] [ -C, --directory DIR ] [--checkpoint ] [ -f, --file [HOSTNAME:]F ] [ --force-local ] [ -F, --info-script F --new-volume-script F ] [-G, --incremental ] [ -g, --listed-incremental F ] [ -h, --dereference ] [ -i, --ignore-zeros ] [ --ignore-failed-read ] [ -k, --keep-old-files ] [ -K, --starting-file F ] [ -l, --one-file-system ] [ -L, --tape-length N ] [ -m, --modification-time ] [ -M, --multi-volume ] [ -N, --after-date DATE, --newer DATE ] [ -o, --old-archive, --portability ] [ -O, --to-stdout ] [ -p, --same-permissions, --preserve-permissions ] [ -P, --absolute-paths ] [ --preserve ] [ -R, --record-number ] [ [-f script-file] [--expression=script] [--file=script-file] [file...]
prime: you must specify exactly one of the r, c, t, x, or d options
For more information, type "prime --help''
Segmentation fault, Core dumped.
Non-Linux Penguins ?
It consists of a bunch of proofs that there is no largest prime - the list of proofs is entitled "15 good reasons why Pure Mathematics is not taught to first year students." My favourites are:
Proof by example:
"Let x be the largest prime. Then x=91 but 91+6=97 which is prime. Therefore 91 cannot be the largest prime number. Therefore there is no largest prime."
Proof by intuition:
"Prime numbers are integers that can be divided by themselves only; prime numbers are odd with the exception of 2. By intuition as n->infinity, there will always be an odd number cannot be divided by another number besides itself."
Proof by experimental data:
"Suppose n is the highest prime. Then 2n-1 is also prime. But 2n-1>n so there is no highest prime. (Check: 2*2-1=3, 2*3-1=5, 2*5-1=11, 2*11-1=23, so true.)"
But the greatest of them all:
Proof by having no idea what a prime is:
"Say the largest prime is x, then 2x is also a prime since the statement is true for all natural numbers."
Go to http://www.ms.unimelb.edu.au/~paradox/archive/ for the magazine, these proofs appeared in issue 2 of 2002.
"very large primes that are difficult to factor."
I can go even further and say that those large primes are IMPOSSIBLE to factor!
Slashdot:
www.eFax.com are spammers
That function is 92.97% accurate. That's an A-. Good enough for me.
If I may say so, life is a game, and there's so much to do and so few turns.
-Reiner Knizia