I Am a Strange Loop - Douglas R. Hofstadter [75]
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 ,…
Do you see anything interesting going on here? Well, for one thing, isn’t it already quite a surprise that it seems to be a fairly even competition? Why should that be the case? Why shouldn’t either Class A or Class B be dominant? Will either the Class A primes or the Class B primes take over after a while, or will their roughly even balance continue forever? As we go out further and further towards infinity, will the balance tend closer and closer to being exactly fifty–fifty? If so, why would such an amazing, delicate balance hold? To me, there is something enormously alluring here, and so I encourage you to look at this display for a little while — a few minutes, say — and try to find any patterns in it, before going on.
Pattern-hunting
All right, reader, here we are, back together again, hopefully after a bit of pattern-searching on your part. Most likely you noticed that our act of highlighting seems, not by intention but by chance (or is it chance?), to have broken the list into singletons and pairs. A hidden connection revealed?
Let’s look into this some more. The boldface pairs are 13–17, 37–41, and 89–97, while the non-boldface pairs are 7–11, 19–23, 43–47, 67–71, and 79–83. Suppose, then, that we replace each pair by the letter “P” and each singleton by the letter “S”, retaining the highlighting that distinguishes Class A from Class B. We then get the following sequence of letters:
S, S, S, P, P, P, S, S, P, P, S, S, S, P, S, P, P, . . .
Is there some kind of pattern here, or is there none? What do you think? If we pull out just the Class-A letters, we get this: SSPSPSSSP; and if we pull out just the Class-B letters, we get this: SPPSPSPP. If there is any kind of periodicity or subtler type of rhythmicity here, it’s certainly elusive. No simple predictable pattern jumps out either in boldface or in non-boldface, nor did any jump out when they were mixed together. We have picked up a hint of a quite even balance between the two classes, yet we lack any hints as to why that might be. This is provocative but frustrating.
People who Pursue Patterns with Perseverance
At this juncture, I feel compelled to point out a distinction not between two classes of numbers, but between two classes of people. There are those who will immediately be drawn to the idea of pattern-seeking, and there are those who will find it of no appeal, perhaps even distasteful. The former are, in essence, those who are mathematically inclined, and the latter are those who are not. Mathematicians are people who at their deepest core are drawn on — indeed, are easily seduced — by the urge to find patterns where initially there would seem to be none. The passionate quest after order in an apparent disorder is what lights their fires and fires their souls. I hope you are among this class of people, dear reader, but even if you are not, please do bear with me for a moment.
It may seem that we have already divined a pattern of sorts — namely, that we will forever encounter just singletons and pairs. Even if we can’t quite say how the S’s and P’s will be interspersed, it appears at least that the imposition of the curious dichotomy “sums-of-two-squares vs. not-sums-of-two-squares” onto the sequence of the prime numbers breaks it up into singletons and pairs, which is already quite a fantastic discovery! Who would have guessed?
Unfortunately, I must now confess that I have misled you. If we simply throw the very next prime, which is 101, into our list, it sabotages the seeming order we’ve found. After all, the prime number 101, being the sum of the two squares 1 and 100, and thus belonging to Class A, has to be written in boldface, and so our alleged boldface pair 89–97 turns out to be a boldface triplet instead. And thus our hopeful notion of a sequence of just S’s and P’s goes down the drain.
What does a pattern-seeker do at this point — give up? Of course not! After a setback, a flexible pattern-seeker merely regroups. Indeed,