Prime Riff

My New Year’s Eve was quiet. After I got off work at 7:30, I headed home, where one of my housemates cooked dinner for the group of us. We contemplated various activities, then ended up kicking back with a magnum of Anchor Steam winter ale and watching a DVD. We noted when midnight hit, and all said that we were glad to see 2006 go.

Another housemate wondered idly if 2007 was a prime number. After about a minute, still watching the movie, I announced that it wasn’t, since it was equal to 223 times nine.

A third housemate looked over at me. “Did you just figure that out in your head?”

“Yeah,” I said. “But I’m that kind of a geek.”

Actually, though, figuring it out wasn’t hard.

Looking at possible factors, I knew right away that it wouldn’t be divisible by two or by five, since numbers ending in seven never are. I also quickly knew that it wouldn’t be divisible by seven, since subtracting the seven that ended the number gave me 2000, which I knew had only twos and fives as factors.I then wondered if it was divisible by nine. Since it ended in seven, the most obvious thing to do was to see what happened when I subtracted 27 (the smallest multiple of nine that ends in seven) from it. That gave me 1980. Dropping the zero and shifting it down a place for the moment, I saw that I had a three digit number, 198, whose second digit was the sum of the first and last. That meant that it was equal to 11 times the number made by the first and last digits, which was 18. That, too, is divisible by nine, so I know that I had hit the right factor. 11 times 18 equals 22 times nine; shifting it back up a spot and popping the zero back on gave me 220, which when I put the three from the subtracted 27 back on, made it 223 times nine, and not prime.

Of course, I had somehow skipped checking if it was divisible by three, which would have been even easier. Blame it on the ale.

Once I knew that it was equal to 223 times three times three, I wondered if 223 was prime. That was pretty easy to figure out.

I knew that it was just under 225, which is 15 squared, so I’d only have to check it against the prime numbers under 15. Two and five were, again, not possible factors for a number ending in three. To check if it was divisible by three, I knocked the three off the end, which gave me 220. I immediately knew that that wasn’t divisible by three, since 210 is, and the difference, 10, isn’t. Similarly, I knew that it wasn’t divisible by seven, since subtracting 63, which is the lowest multiple of seven that ends in three, gave me 160, which I knew was, again, only made up of twos and fives.
That left 11 and 13. I knew that the nearest multiple of 11 was 220, so the difference of three ruled it out. 13 was trickier, but subtracting 13 from 223 gave me 210, which, again, I knew to be only made up of twos, threes, fives, and sevens.

So I knew pretty simply that 2007 is factored down to 223 times three times three.

The weird part is that I can do this in my head pretty easily. But when I’m, say, making change at a cash register, and a customer hands me some extra coins once I’ve already opened the till and expects me to figure out the change, which is now simpler than the register has figured out, my arithmetic skills immediately desert me, and I go deer-in-the-headlights as I thrash about to figure out what’s needed.

I think it’s something like competitive punning: if I know that I’m being expected to quickly come up with some witticism, I go blank, much as if I’m supposed to do an instant calculation. But if I can do it more casually, when no one will notice if I don’t come up with something, I can do it just fine.