Short Story with "All Odd Numbers Are Prime" Joke

Does anyone remember a short story (perhaps in Analog around the 1970s) which included a joke about engineers similar to what are called "Polish" jokes in the US and "Irish" jokes in England?

It revolved around the proposition that all odd numbers are prime, which supposedly generated three responses.

Mathematician - Three five and seven are prime but nine isn't, so proposition is false.

Scientist - Well, eleven and thirteen are also prime, so the proposition is generally correct with just the odd exception.

Engineer - Three is prime, five is prime, seven is prime, nine is prime . . .

I have a hazy recollection that the story ends with another joke, in which the engineer comes off best.

• archive.org/stream/ProofsTextbooks/… is probably the joke you're thinking of. Sep 20, 2020 at 21:35
• I vaguely remember a Computer Science Department variant where the tag line is "Progammer - one is prime, three is prime, three is prime, three is prime, three is..." Sep 26, 2021 at 2:57

Epicycle by P. J. Plauger. It was published in Analog, November 1973.

The first mention in the story is:

"No, seriously," I hurried on. "If you were to ask a mathematician to test it he might say: 'Let me see, now. One is prime, three is prime, five is prime, seven is prime. Nine? Nine's not prime. Clearly the theorem is false.'

"But a physicist is more pragmatic. She, I mean he," the slip was calculated, and had the usual effect on a male listener, "might say: 'Let me see, now. One is prime, three is prime, five is prime, seven is prime. Nine? That may be an experimental error—let's go on.' "

Jenkins smiled.

"Eleven is prime, thirteen is prime, fifteen is… Well, that's a lot of data points. The theorem is probably true.'"

He laughed outright.

"But if you ask an engineer to test the theorem, he might say: 'Let me see, now. One is prime, three is prime, five is prime, seven is prime, nine is prime, eleven is…'"

Then the later mention is:

A little vindictively, I began, "You know, I just thought of another of those stories we used to tell back in school." Again, my entertainment-starved audience was all ears. "This is about a hotel, where a mathematician, a physicist and an engineer are spending the night in separate rooms. Late at night a fire breaks out and spreads rapidly to each of the rooms. What do you suppose they do?

"Well, the engineer wakes up, smelling smoke. He sees the fire and quickly dashes out into the corridor, grabs a fire extinguisher off the wall, runs back to his room and drowns the flames. For safety, he then soaks the walls, ceiling, floor and mattress. Tossing the empty extinguisher aside, he climbs into his soggy bed to get what sleep he can.

"Then the physicist wakes up, smelling smoke. He sees the fire and quickly dashes out into the corridor, grabs a fire extinguisher off the wall, runs back to his room and makes a brief test blast. After a quick calculation, he aims a four-second blast at the base of the fire and puts it out. Setting the extinguisher next to his bed, he lies down to rest and watch for another outbreak."

That was my favorite part.

"Then the mathematician wakes up, smelling smoke. He sees the fire and quickly grabs a pad of paper and a pencil. He makes a number of calculations, glances at the fire, makes a few more. After a while, he wanders into the bathroom, turns on the tap and dabbles his fingers in the water. Looking back at the fire, he smiles and says: 'Aha! A solution exists!' Then he goes back to bed."

• I read the story. I was thinking of the last joke when I read your response. I can't remember anything else about the story, though. Sep 21, 2020 at 20:17
• It's been a long tie since I read it but iirc it is set on a satellite which needs to rendezvous with another one, but whose computer has broken down or something. One of the crew (an engineer?) is able to make the necessary computation by using the old Ptolemaic system of cycles and epicycles. Factually, of course, the system is nonsense, bit it held sway for so lone because, mathematically, it gave the right answers. Sep 22, 2020 at 7:45

There are many versions of this joke. I think I first saw it in Stephen Siklos's university entrance exam preparation text Advanced Problems in Mathematics: Preparing for University:

Mathematicians should feel as insulted as engineers by the following joke.

A mathematician, a physicist and an engineer enter a mathematics contest, the first task of which is to prove that all odd number are prime. The mathematician has an elegant argument: ‘1’s a prime, 3’s a prime, 5’s a prime, 7’s a prime. Therefore, by mathematical induction, all odd numbers are prime.’ It’s the physicist’s turn: ‘1’s a prime, 3’s a prime, 5’s a prime, 7’s a prime, 11’s a prime, 13’s a prime, so, to within experimental error, all odd numbers are prime.’ The most straightforward proof is provided by the engineer: ‘1’s a prime, 3’s a prime, 5’s a prime, 7’s a prime, 9’s a prime, 11’s a prime . . . ’.

Sean Duggan mentioned in a comment another version from Georg Polya's Mathematics and Plausible Reasoning, Volume 1: Induction and Analogy in Mathematics:

“Look at this mathematician,’ said the logician. “He observes that the first ninety- nine numbers are less than hundred and infers hence, by what he calls induction, that all numbers are less than a hundred.’

“A physicist believes,” said the mathematician, “that 60 is divisible by all numbers. He observes that 60 is divisible by 1, 2, 3, 4, 5, and 6. He examines a few more cases, as 10, 20, and 30, taken at random as he says. Since 60 is divisible also by these, he considers the experimental evidence sufficient.”

“Yes, but look at the engineers,” said the physicist. “An engineer suspected that all odd numbers are prime numbers. At any rate, 1 can be considered as a prime number, he argued. Then there come 3, 5, and 7, all indubitably primes. Then there comes 9; an awkward case, it does not seem to be a prime number. Yet 11 and 13 are certainly primes. ‘Coming back to 9/ he said, ‘I conclude that 9 must be an experimental error.’ ”

Jokes like this have long since passed into the folklore of the mathematical/scientific/engineering community, being passed around mostly orally and changed slightly each time. The joke you remember isn't exactly the same as either of the versions above (much closer to the Siklos one than the Polya one), but whether you're slightly misremembering or you heard a slightly different version is hard to guess. For more of these kinds of jokes (or if you want to have all the humour ruined by a thoroughly scientific dissection of them), see Renteln and Dundes, "Foolproof: A Sampling of Mathematical Folk Humor", Notices of the AMS 52(1) (2005), pp. 24-34. This particular joke isn't featured there, but you can see something of how such jokes mutate and evolve as they pass through the community by word of mouth.

• Thanks for the suggestions. Since asking the question I have recalled a fragment of the second joke. The three are at a conference or something, and their hotel catches fire. I don't recall exactly what the engineer and the scientist do, though I'm fairly sure it's the engineer who does the right thing. But the punch line goes. "And the mathematician says "Aha!! There is a solution." - then turns over in bed and goes back to sleep." Sep 21, 2020 at 9:15
• @MikeStone That's another old chestnut in the mathematician/scientist/engineer community. Sep 21, 2020 at 10:48