Explained from scratch
Certain whole numbers have a strange self-referential property. It turns out that entire families of prime numbers are locked out of that club forever — and one line of arithmetic says which.
Suppose you have a rule that turns a whole number into another whole number, and you ask which numbers happen to divide the result of applying the rule to themselves — not exactly, but through their prime ingredients. That is a self-referential condition, and there is no obvious reason it should behave in any orderly way.
The question here is narrower and sharper. Can a prime number be excluded from that club entirely? Not rare, not hard to find — impossible, for every number, forever.
The answer is yes, and the primes it happens to form neat families: for one rule it is every prime that leaves remainder 3 when divided by 4; for another, every prime that leaves remainder 2 when divided by 3.
rad(n).Pick a rule f. The oldest is «add up all the divisors»;
the one used most here is «take the prime power and add one», so
3³ becomes 27+1 = 28.
The club. A number n belongs when
rad(n) divides f(n).
Now the observation that turns this into something you can draw. A prime divides a product only if it divides one of the pieces. So instead of one big multiplication, ask for each prime in your number: is there another prime whose piece is divisible by it? Draw a dot per prime, and an arrow from q to p when the piece contributed by q is divisible by p.
Your number is in the club exactly when every dot has at least one arrow pointing at it. Nobody vouches for themselves; one arrow in is enough.
Take the three primes 3, 7 and 11, and the rule «add one». Choose the exponents 3, 5 and 1, so the number is 4991679 = 3³ · 7⁵ · 11. Work out the three pieces:
Now try to do it with only two of those primes. You cannot, and not for lack of trying: each of the three pairs fails, always for the same reason.
An earlier piece of this work computed how often pairs of primes can be covered, and got an exact fraction, 31/72. It also proved something rigid: for two primes that both leave remainder 3 when divided by 4, it is never possible. The reason is a theorem Gauss proved in 1801, quadratic reciprocity: for such a pair, exactly one of the two possible arrows can exist, so one dot always goes unvouched.
That left an obvious question hanging, and nobody had answered it: what happens with three?
With three such primes, each pair still contributes exactly one arrow, so you get a triangle with three arrows. There are eight ways to orient it. In six, somebody is left with no arrow pointing at them. In the other two — the ones that go round in a circle — everybody is covered.
Whether an arrow into p can exist depends on the order, and the order always divides p − 1. For some rules, an arrow into p needs that order to be divisible by a fixed number m. Put the two together:
If m does not divide p − 1, then no order can be divisible by m, so no arrow can ever point at p — from any prime, inside any number, ever. That prime divides no member of the club at all.
For the rule q2e+1, that locks out every prime leaving
remainder 3 when divided by 4. And here it is in one line: an arrow into 3 would
need q2e to leave remainder 2 when divided by 3 —
but q2e is a square, and squares leave only remainder 0 or
1. Impossible, forever.
Among the first 429 odd primes, 218 are locked out for that rule, and they are exactly the ones leaving remainder 3 when divided by 4 — not most of them, all of them.
You would expect that adding primes makes covering easier: more dots, more possible arrows. For rules with no locked-out primes that is right — and in fact every set of primes works, because you can always arrange them in a circle. But if a rule has locked-out primes, each extra prime is another chance to draw one, and the proportion falls instead.
Every claim was tested twice, by methods that share no reasoning. The fast
criterion was checked against a slow brute-force search that simply computes
f(qe) as an ordinary integer and looks at its factors.
Over thousands of cases the two never disagreed — except once, which is how
a genuine mistake was found: for one rule the general description fails at the
single prime 3, and 30 disagreements pointed straight at it.
The locked-out primes were checked directly on every whole number up to three million. Of the 379 members of that club, exactly 0 have a forbidden factor.
Why a zero is not evidence on its own. A search that finds nothing proves nothing until you show it would have found something. So the same search was run on a third rule, one with no locked-out primes. It found 578. The machinery works; the zeros are real.
And the last check in the code is deliberately not about these results at all: it reproduces a density computed by Helmut Hasse in 1966. If the machinery agrees with a sixty-year-old published theorem, there is a reason to trust it on the parts that are new.
Two things, both practical for anyone working on these objects.
First, it makes searches finite where they were open-ended. If you are hunting for members of one of these clubs, you can now discard half the primes before starting, and know you have lost nothing.
Second, it settles a question that looked like it needed measurement. Whether «more primes helps» is not something to be estimated by sampling: it can be read off the rule in advance, from whether any arrow is forbidden. That turns an empirical question into a one-line check.
qe+1 on prime powers.q2e+qe+1.verify.py. Cited as Hasse's, not claimed.