Thursday, 27 December 2012

Giuga Numbers - an introduction



A modular problem revisited aka Giuga numbers

I think this is quite interesting… I’ve been messing with this problem for a while. Eventually I found some more examples and this enabled me to track down work that others have done.

The original question was this:

Are there any odd numbers with factors a<b<c for which

ab = 1 mod c
ac = 1 mod b
bc = 1 mod a

Apparently these kinds of numbers are called Giuga Numbers. You can also define them thus:

If X is a Giuga number, then for any of its prime factors p
X/p – 1 = 0 mod p

(I already knew that an even Giuga number exists, 30, for which
2x3 = 1 mod 5
2x5 = 1 mod 3
3x5 = 1 mod 2)

Now, it’s fairly easy to prove that you can’t find an odd Giuga number with less than nine factors. (I’ll put my version of this proof at the end for anyone interested). But the question becomes more complicated for numbers with more factors, for instance is there an odd Giuga number abcdefghi for which

abcdefgh = 1 mod i
abcdefgi = 1 mod h

And so on.

I wanted to start by looking at how we can construct/discover a Giuga number, regardless of whether it is even or odd.

First, let’s start with the really trivial case of a Giuga number with two factors. And (for reasons which will become clear) let’s also look for numbers for which

a = -1 mod b
b = -1 mod a

Clearly this isn’t going to work for many numbers because where a < b, a = a mod b

The only cases where it does work are:

  1. 2 – this is trivial but worth noting. If you allow the idea of “mod 1”, we can use a residue number system where the co-ordinates are mod 1 and mod 2 and we get
1 = 1 mod 2
2 = 1 mod 1

a+b = (0,1) + (1,0) = (1,1) = 3
ab = (0,1) x (1,0) = (0,0) = 2

  1. The above is trivial but it leads to one more example which isn't a Giuga number, but which has a related form, 6 (2 x 3):
2 = -1 mod 3 = (0,-1)
3 = -1 mod 2 = (-1,0)

a+b = (-1,-1) = 5
ab = (0,0) = 6

From here, we can go on to construct a few examples of Giuga numbers.

Firstly, we already know that 30 is a Giuga number so let’s look at how it works, using the residue number system for mod (2,3,5):

2 = (0, -1, 2)
3 = (-1, 0, 3)
5 = (-1, -1, 0)

2x3 = (0,0,6) = (0,0,1)
2x5= (0,1,0)
3x5 = (1,0,0)

We’ve added c = 5 to the grid, and because ab = ± 1 mod c we end up with ± 1 in the appropriate position (in place of 6 in the co-ordinates for 2 x 3)

The next step is to see if we can repeat the trick using abc = ± 1 mod d.

It doesn’t work for 2x3x5x29 or 2x3x5x31 because we end up with an uneven mix of +1s and -1s (see Appendix 2 for the calculations).

So let’s take a step back and look at 2x3x7 = 42

2 = (0, -1, 2)
3 = (-1, 0, 3)
7 = (1, 1, 0)

2x3 = (0,0,6) = (0,0,-1)
2x7= (0,-1,0)
3x7 = (-1,0,0)

So ab = -1 mod c
ac = -1 mod b and
bc = -1 mod a

This isn’t a Giuga number – so let’s call it a primary pseudoperfect number (OK, I googled that – basically it means one where the factors X/p = -1 mod p for all the prime factors p of the composite X).

The interesting thing here is howwe can extend this using d, where abc = ± 1 mod d.

2x3x7x41 = 1722

2 = (0, -1, 2, 2)
3 = (-1, 0, 3, 3)
7 = (1, 1, 0, 7)
41 = (-1,-1,-1,0)

2x3x7 = (0,0,0,42) = (0,0,0,1)
2x3x41 = (0,0,-6,0) = (0,0,1,0)
2x7x41 = (0,1,0,0)
3x5x41 = (1,0,0,0)

This works to produce a new Giuga number, because the +1s and -1s balance out (because the one negative result, -6, is nonetheless +1 in mod 7)

So 1722 is a Giuga number

(At this stage I cheated a bit by googling “30,1722” and found via the lovely OEIS - that what I was looking for was called a “Giuga number”. See Appendix 2 for more detail on the relationship between Giuga numbers and primary pseudoperfect numbers.)

As it happens, 858 is also a reasonably small Giuga number so let’s see how this one works.

2x3x11x13
2 = (0, -1, 2, 2)
3 = (-1, 0, 3, 3)
11 = (-1,-1, 0, -2)
13 = (1, 1, 2, 0)

2x3x11 = (0,0,0,-12)
2x3x13 = (0,0,12,0)
2x11x13 = (0,1,0,0)
3x11x13 = (1,0,0,0)

In the next post I will give what I think it is a proof that all Giuga numbers are even


Appendix

Here’s the original proof of the original problem for three odd numbers - using a residue number system.

ab = (0,0,1) = abc/c
ac = (0,1,0) = abc /b
bc = (1,0,0) = abc/a

ab + ac + bc = (1,1,1) = ab +1 (or = 1 or a higher multiple of ab + 1)
ab + ac + bc = abc/a + abc/b + abc/c
So ab + ac + bc can’t add up to more than 1/3 + 1/5 + 1/7 = 70/105

RAA

This proof works up to eight factors as 1/3 + 1/5 + 1/7 + 1/11 + 1/13 + 1/17 + 1/19 + 1/23 < 1 but thereafter it fails.

You also can’t have an odd Giuga number with less than 1415 factors and an odd number of factors because all of abcdefg…etc are odd, so for an odd number of factors, the sum abcd + abce + abde + acde + bcde is odd and can’t be abcde+1.

This proof works up to 1415 factors because that is how many factors would be needed before this sum can equal 2abcde+1.

However if the proof in the next post works, neither of these proofs are needed.

Edit nb the next post is missing because there were some flaws, which I might or more likely might not be able to iron out.


Appendix 2

It also turns out that if a primary pseudoperfect number is one less than a prime then the product P(P+1) gives a new primary pseudoperfect number. However if a primary pseudoperfect number is one more than a prime then the product p(P-1) gives a Giuga number.

For instance we’ve seen that 42 x 41 = 1722. (Giuga)
And 42 x 43 = 1806 (Primary pseudoperfect)

47508 x 47507 = 2214408306 which is a Giuga number

Appendix 3

2 x 3 x 5 x 29 = 870

2 = (0, -1, 2, 2)
3 = (-1, 0, 3, 3)
5 = (-1, -1, 0, 5)
29 = (-1,-1,-1,0)

2x3x5 = (0,0,0,30) = (0,0,0,1)
2x3x29 = (0,0,-6, 0) = (0,0,-1,0)
2x5x29 = (0,-1,0,0)
3x5x29 = (-1,0,0,0)

This doesn’t work because we have an uneven mix of +1 and -1s. The same problem applies to the next attempt:

2 x 3 x 5 x 31 = 930

2 = (0, -1, 2, 2)
3 = (-1, 0, 3, 3)
5 = (-1, -1, 0, 5)
31 = (1, 1, 1,0)

2x3x5 = (0,0,0,30) = (0,0,0,-1)
2x3x31 = (0,0,6, 0) = (0,0,1,0)
2x5x31 = (0,1,0,0)
3x5x31 = (1,0,0,0)


2 = (0, -1, 2, 2)
3 = (-1, 0, 3, 3)
5 = (-1, -1, 0, 5)
29 = (-1,-1,-1,0)

2x3x5 = (0,0,0,30) = (0,0,0,1)
2x3x29 = (0,0,-6, 0) = (0,0,-1,0)
2x5x29 = (0,-1,0,0)
3x5x29 = (-1,0,0,0)

Wednesday, 21 November 2012

Twin primes, fractals and frequencies

Following on from the previous post, here are a few thoughts about twin primes and frequencies.

I was picturing primes in terms of frequencies between 0 and 1. We can also reduce each set of twin primes to a single frequency, by looking at their product.

If we start by dividing the line into sixths, this gives us the product of 2 and 3 (which obviously can't overlap with any twin primes other than the pair 3/5, and nor can any shorter frequency reached by dividing by 2 or 3).

Now we know that neither of the frequencies for 1/5 and 1/7 will intersect the frequency for 1/6. We also know that the largest frequency which will intersect with both 1/5 and 1/7 is 1/35.

So we find the frequency 1/35 that hits both 1/5 and 1/7 (badly drawn above).

This frequency is symmetrical within the space, never intersects with the frequency 1/6 (or for 1/36).

To sieve for twin primes, we could go up through each pair of 6n+1/6n-1 numbers 11 and 13, 17 and 19, 23 and 25, and add the frequency for their product - 143, 323, 575 etc. When any part of this frequency coincides with an existing frequency, this is not a twin prime. For instance 115/575 coincides with 7/35 (both = 1/5), so we know 23 and 25 cannot be a pair of twin primes.

I like this idea in theory because it reduces the problem of twin primes to a symmetrical problem in which we are looking at a single number each time, the semi-prime product of two potential twin primes, rather than the overlapping patterns of two different patterns. We know there is an infinitude of semi-primes, though this need not mean that there is an infinitude of twin prime pairs.

You can also visualise the sieve I used on the previous post working for twin primes - that worked by dividing each number by the square of each of its factors. If we go through each 6n+1/6n-1 product, then we need to divide by the square of any two of its factors - so we get the series 1/35, 1/143, 1/323 - but for 575 we only get 575/25 = 1/23.

Each time we get a number that is smaller than the fractions/frequencies we have got before, we have reached a new pair of twin primes - because 575 only gives us 1/23 we know if can't be a twin prime pair product. Similarly 1295 (35x37) gives us 1295/37^2/49 = 25/37 and 49/37, neither of which are smaller than previous twin prime frequencies.

So there are things to like about this way of exploring twin primes - however I'm not sure it is actually much use in practise - the sieve outlined above is really laborious as it depends on factorisation, so it is only interesting as a mental representation. And I can't see any way of applying the frequency model that gives us anything we didn't already know about twin prime distribution.

The one thing that does interest me is that both the prime sieve in the previous post and the twin sieve in this post can be described in terms of a repetition of the same transform over and over. For primes you simply test the next integer by shrinking it into the space between 0 and 1. For twin primes you test the next semi-prime product of two n and n+2 numbers by shrinking into the space between 0 and 1. (I only bothered with the 6n+1 and 6n-1 numbers but a more basic algorithm would be to test every instance of n(n+2) where n is an integer and n=n+2.

I'm a bit boring about the fractal nature of prime number patterns but this brings out that fractal nature for me - as I said in the previous set this way of depicting the number line makes it look a lot more like the construction of a Cantor set.



Saturday, 10 November 2012

Prime numbers, fractals and frequencies



Prime numbers, fractals and frequencies

I’ve been thinking about numbers in terms of frequencies. This is partly inspired by Terence Tao talking abut primes in terms of frequencies, and partly because I was pondering whether there is a similarity between the Cantor Set and the pattern of primes.

To explain this, I’m going to start with a really basic look at integers, then move quickly on to primes (for which we can give a Euclid-derived proof based on frequencies) and then twin primes (for which this approach gives an interesting model to think about).

Integers as frequencies.

I will mostly be looking at the number space between 0 and 1.

If we think about frequencies that can intersect both 0 and 1, the first wave below represents a frequency of 1 (blue) then 2 (red), 3 (green), then 4 (purple). Any frequency which intersects 0 and 1 and divides the space in between into equal segments represents an integer.



(The image is a bit like a badly drawn Fourier transform – I need to read a bit more about them as they may relate more closely than I realise to what I’m talking about here).

If we didn’t know that there is a infinitude of integers, we could “prove it” thus.

Take the highest frequency you have already found (in this case 4), then extend it by one cycle. Then scale the resulting pattern down to fit the space between 0 and 1.




Yellow represents the frequency for the number 5.

You can always do this, so there is an infinitude of integers (big surprise…)

Primes as unique frequencies

Looking at the images above we can see that the wave pattern for 4 coincides with the pattern for 2 at one point – this indicates that 4 is not a prime number. Any multiple of 2 will coincide with the frequency for the number 2, any multiple of 3 will coincide with the frequency for 3 and so on.

A frequency represents a prime number if it doesn’t coincide with the frequencies for any smaller integers at any point along the central axis.

There is a useful sieve we can now use to isolate prime numbers. (I think this is loosely related to the Von Mangoldt function in the way that it treats square factors differently from unique factors….)

This process can be described in terms of pure frequencies, but to make it quicker to understand I’ll assume we can work out the factors of any integer.

Here’s the sieve:

Take each integer N > 1 and divide by the square of each of its unique factors. For instance, for 30 = 2 x 3 x 5 we end up with 30/4, 30/9, 30/25. For 20 we end up with 20/4 and 20/25. For 36 we end up with 36/36 = 1. For 31 we end up with 1/31.

Then map the results onto a line representing the number line.

2/4 = 1/2
3/9 = 1/3
4/4 = 1
5/25 = 1/5
6/4 = 3/2
6/9 = 2/3
7/49 = 1/7
8/4 = 2
9/9 = 1
10/4 = 5/2
10/25 = 2/5
11/121 = 1/11
12/9 = 4/3
12/4 = 3

This means all primes have been turned into their reciprocals. (I have a feeling that as with the Von Mangoldt function, this is related to natural logarithms, since powers of primes are reduced by this method to one less than the power of their prime factor – eg 4 becomes 1, but 8 becomes 2 – this doesn’t really matter though - the main issue is that the sieve isn't mixing up primes with powers of primes even though both have only one factor).

OK, now we are going to look at how the prime reciprocals fall between 0 and 1.

Look at these sequences
0, ½, 1
0, 1/3 2/3 1
0, 1/5, 2/5, 3/5, 4/5, 5

The furthest number to the left (the smallest fraction) is a prime reciprocal. This process gradually accumulates all the prime reciprocals in the space between 0 and ½. As we sieve upwards through the integers, the smallest fraction on the number line will always be a prime reciprocal.

Each represents a unique frequency which can start on 0 and finish on 1.

So this gives us a way to recast Euclid’s poof of the infinitude of primes.

A. Assume there is a finite number of primes.

If this is the case then above the highest prime x, all future whole numbers will create frequencies that land on points of this line which are already occupied. For instance if we add a frequency of ¼ it will land on 1/2, if we add a frequency of 1/6 it will land on 1/3, ½ and 2/3. This is because 4 is a multiple of 2 and 6 is a multiple of 2 and 3.

So given A. there must be a finite number of primes which generate the frequencies for all higher numbers.

B. It’s easy to show that for any x, there are infinitely many numbers y that have no prime factors smaller than x.

This also means that for any set of prime reciprocals up to x, there are infinitely many frequencies which don’t coincide with any of the reciprocals of multiples of the numbers up to x. The first interval on each of these frequencies will be a prime reciprocal.

So the statement B is all we need to prove that statement A is false, since the first frequency > x that doesn’t coincide with the prime frequencies up to x must be a prime frequency.

The thing I really like about this method is that it is a perfect sieve for prime numbers and it also brings out the “fractal” nature of primes, which I have mentioned before – we are basically partitioning the space between 0 and 1 over and over using the same method (given above for integers), overlaying an infinite number of frequencies into the same space - and the pattern we end up with has an infinitude of prime frequencies, each of shorter period – so thinking in terms of reciprocals gets us much closer to a Cantor Set than is obvious from considering the number line from 1 upwards.

Next I’m going to use a similar method to look at twinprimes.

Friday, 20 July 2012

A modular problem page 2

I can go some way to generalising the proof I made for 3 factor numbers to numbers with more factors. For instance:

A number has 4 odd prime factors a < b < c < d

Assume
abc = 1 mod d = (0, 0, 0, 1)
abd = 1 mod c = (0, 0, 1, 0)
acd = 1 mod b = (0, 1, 0, 0)
bcd = 1 mod a = (1, 0, 0, 0)

abc + abd + acd +bcd = (1, 1, 1, 1)

Subtract 1

= (0, 0, 0, 0) = 0 or abcd

a >= 3, b >= 5, c >= 7, d >=11

abc =< abcd/11
abd =< abcd/7
acd =< abcd/5
bcd =< abcd/3

1/3 + 1/5 + 1/7 + 1/11 = 886/1185

abcd = 1185

Therefore (1, 1, 1, 1) ≠ abcd + 1

abc + abd + acd +bcd = 1

RAA

Therefore the initial assumption was impossible.

It looks to me as though this works up to 8-factor numbers (and would have worked for 3 factor numbers) but then stops working because 1/3 + 1/5 + .... 1/ 23+ 1/29 > 1 (29 being the 9th odd prime).
A number has 4 odd prime factors a < b < c < d
 Also, if this works at all, then it works for any number with an odd number of factors, for instance for five factors:

abcd + abde + abce +abde + bcde = (1, 1, 1, 1, 1)

Subtract 1

= (0, 0, 0, 0, 0) = 0 or abcde

However abcde+1 is even, and (abcd + abde + abce +abde + bcde) is odd.

so abcde+1 ≠ (abcd + abde + abce +abde + bcde)

(Actually this last bit isn't completely sound - if abcd + abde + abce +abde + bcde = 1 mod abcde but this is a multiple of abcde rather than abcde itself, then the proof doesn't hold - but this at least extends the proof to numbers with a very large number of odd factors since it takes a long time to reach 2 in the series 1/3 + 1/5 + 1/7  + 1/11.... However this series isn't convergent, so you do eventually get to 2)



CRGreathouse also commented that

"You can extend it to 9- or even 10-factor numbers by adding finite checking. Probably too difficult for more than 9 factors if you're doing it by hand, though."
Which is correct - there would be many combinations for 9, 10 and above where the fractions didn't exceed 1, so it does work in theory for a big swathe of highly composite numbers - you just can't make it a general proof without finite checking.

A modular problem

This is something I already put up on My Math Forum.

Let a, b, c be three different prime numbers.

Is it possible that

ab = 1 mod c
ac = 1 mod b
bc = 1 mod a

This is clearly possible if one of the numbers is even as 30 is an example:

6 = 1 mod 5
10 = 1 mod 3
15 = 1 mod 2

But is it possible if they are all odd?

abc has three prime factors, a < b < c
Each number below abc has a unique set of modular residues for a, b, c which we will express as (x, y, z)

Assume
ab = 1 mod c
ac = 1 mod b

Start at (0, 0, 0) = 0
First we add (0, 0, 1) to get ab = 1 mod c = (0, 0, 1)
Then we add (0, 1, -1) to get to ac = 1 mod b = (0, 1, 0)

Now, assume we add (0, 1, 0) + (-1, -1, 0) = (-1, 0, 0)

If (-1, 0, 0)= bc then bc ≠ 1 mod a

We know that (-1, -1, 0) < bc because
(0, 0, 1) = ab
(-1, -1, 0) = (0, 0, 1) – 1 = ab - 1
ab < bc
Therefore (-1, -1, 0) < bc

Is it possible that (-1, 0, 0) ≠ bc?

To get to any other value of (x, 0, 0) we must add or subtract a multiple of bc from (-1, 0, 0)

We can’t subtract because (-1, 0, 0) < bc.

And (-1, 0, 0) + bc > bc.

Therefore (-1, 0, 0) = bc

Therefore bc ≠ 1 mod a

C.R.Greathouse helpfully pointed out that since I hadn't clearly specified that a, b, and c were odd that last bit didn't work - there's a bit more detail on how that can be cleaned up here.

What I really want is a more general version of this proof, that applies to numbers of more than three factors, as that would fit in with the other stuff I've been working on. I've made a start on this here.

Tuesday, 17 July 2012

A simpler thought on twin primes

C.R.Greathouse from My Math Forum has succeeded in convincing me I was either wrong or overcomplicating things (or just being a crank...) in a few previous posts, which I've taken down for now. The "stretching and merging" created some problems, at the very least it made it pretty hard to conceive of how individual substitutions of numbers actually affect the pattern.

This is a simplified approach, which doesn’t depend on any stretching or merging - I'm not offering it as a proof, but to try and communicate the bit I find interesting and see if there is any way to improve this.




Again, this is based on the idea of numbers laid out in a hypercuboid.

In the diagrams above I am just colouring any pn plane other than (p^2)n+p black and any pn+2 plane other than (p^2)n+p+2 black. Every number starts out white. Once a number is black it stays black.

(I’ve started from the point where even numbers are already coloured black) - the 49n grid is incomplete but I hope there is enough for clarity.)

We leave the (p^2)n+p plane and the (p^2)n+p+2 plane white (except where they are intersected by a black plane).

I would like to argue that:

Every number will end up white or black. Any number >3 that ends up white is a twin prime. If there is an infinitude of white squares in this pattern (once it has been continued infinitely) then there is an infinitude of twin primes.

This seems counter-intuitive because we are doing nothing to mark how the (p^2)n+p numbers intersect with the (p^2)n+p+2 numbers. I believe we don’t need to because any number >3 that doesn’t end up black in this grid must be on both a (p^2)n+p plane and  a (p^2)n+p+2 plane, and can’t be on more than one of each.

However, for this to hold, I do have to make an assumption :

Let a, b, c be three different odd prime numbers.
Assume it is not possible that
ab = 1 mod c
ac = 1 mod b
bc = 1 mod a

(I've proved this bit here.)

(This is possible if one of the numbers is even as 2, 3, 5 is an example: 6 = 1 mod 5, 10 = 1 mod 3, 15 = 1 mod 2).

We also need to assume the same principle for numbers with more factors, for instance for 4 factors, assume that it is not possible that
abc = 1 mod d
abd = 1 mod c
acd = 1 mod b
bcd = 1 mod a

I've proved this for up to 8 factors and for any number with an odd number of factors here. But it is still a big assumption to assume it holds for all numbers.

That rather big assumption has an interesting consequence.

If true, I think it means we don’t have to worry about how the (p^2)n+p plane and (p^2)n+p+2 planes intersect in the grids above. Which means that this is a simpler and more effective sieving process than it might look on first sight. Here's why:

For an odd composite number X to appear on a (p^2)n + p plane, it must be expressible as p(pn+1).

This means that the product of the prime factors of X other than p must be expressible as pn+1.In other words if the factors are a and b, a = 1 mod b.

For a number with two odd factors, for instance 3 x 13, it is clearly impossible that
a = 1 mod b
b = 1 mod a

So any composite number with two odd factors is on at least one black plane. (For instance 39 is on the 169n+39 black plane, 9 is on the 9n black plane.)

And if the assumption above about 3+ factor numbers is true then any number that is on more than one (p^2)n + p plane is on at least one black plane.

The same also holds for any number on more than one (p^2)n + p + 2 plane (for the same reason, as this is also dependent on the factors of (p^2)n + p.)

So any number which isn't on a black plane is on only one (p^2)n + p plane and only one (p^2)n + p + 2 plane, and is thus a twin prime.

I find this interesting because rather than looking at the interaction between two patterns (pn and pn+2) we only need to look at the one pattern.

Now, what I was previously trying to do is to find a tricksy way to show that the pattern of intersections between the black planes is topologically equivalent in this grid and in the prime one where we don’t eliminate any pn+2 planes. But doing it with “duplicating and/or merging” creates other problems as Mr Greathouse patiently prodded me towards seeing.

However, it still seems to me that the situation in the grid above has some kind of topological equivalence to the situation in the prime grid. In each dimension we simply take a black slice through part of the hypercuboid –  the black slices are just wider in the twin version.

(For instance, on a really basic topological level - imagine we rearranged each dimension with the black planes in the middle and the white ones on either side, like this:



There is no logical reason we can't do that as we aren't losing any numbers and can rearrange the planes in the same order in each version. Then we could physically widen (without duplicating) the white planes and narrow (without deleting) the black planes in the twin version of the image (top) and end up with the same area of the cross section being coloured black or white as on the prime version (bottom) - this wouldn't give us any more or less numbers in the white and black areas, but it would be one way of bringing out the topological similarity (- it's a damn sight closer than a doughnut and coffee mug, at least).

I know it wouldn't be fair to assume that a process of this sort necessarily leads to an infinitude of gaps, but we do already know that in the prime version it does leave an infinitude of gaps. 

So 1) is the assumption above correct for 8+factor numbers and 2) is it fair therefore to assume that there is an infinitude of gaps in this pattern? If not, there's probably not a way forward... I wonder if there is a more precise, formal way to look at the topological equivalence question though?

Monday, 16 July 2012

Plane substitutions.

OK, to help explain the logic of the attempted twin prime proof, here is an example of how the plane substitutions work. Here's the starting point of the 4n x 9n grid (in other words how it looks in the prime number hypercuboid we started from).



















4n
4n+1
4n+2
4n+3
9n
36
9
18
27
9n+1
28
1
10
19
9n+2
20
29
2
11
9n+3
12
21
30
3
9n+4
4
13
22
31
9n+5
32
5
14
23
9n+6
24
33
6
15
9n+7
16
25
34
7
9n+8
8
17
26
35

Now I am going to duplicate the 9n +1 and 9n+7 plane. The 9n+2 and 9n+8 plane are coloured black (as well as the 4n+2 column). The 9n+5 is coloured yellow.

4n
4n+1
4n+2
4n+3
9n
36
9
18
27
9n+1
28
1
10
19
9n+1
28
1
10
19
9n+2
20
29
2
11
9n+3
12
21
30
3
9n+4
4
13
22
31
9n+5
32
5
14
23
9n+6
24
33
6
15
9n+7
16
25
34
7
9n+7
16
25
34
7
9n+8
8
17
26
35



 If we omit the black planes at 9n+2 and 9n+8 we have two horizontal black planes as in the original diagram (in the proof I talk about merging planes but I think it makes more sense to simply discard them.) The grid contains some repetitions and some numbers in the number chain are missing (but we know they aren't twin primes).

9n
36
9
18
27
9n+1
28
1
10
19
9n+1
28
1
10
19
9n+3
12
21
30
3
9n+4
4
13
22
31
9n+5
32
5
14
23
9n+6
24
33
6
15
9n+7
16
25
34
7
9n+7
16
25
34
7

 Next we need to extend this up to the 25n plane. The first few slices look like this (before they are sorted by their residue mod 25):


36
9
18
27
28
1
10
19
28
1
10
19
12
21
30
3
4
13
22
31
32
5
14
23
24
33
6
15
16
25
34
7
16
25
34
7

72
45
54
63
64
37
46
55
64
37
46
55
48
57
66
39
40
49
58
67
68
41
50
59
60
69
42
51
52
61
70
43
52
61
70
43

108
81
90
99
100
73
82
91
100
73
82
91
84
93
102
75
76
85
94
103
104
77
86
95
96
105
78
87
88
97
106
79
88
97
106
79

To make it easier to see what the next stage looks like, I'm going to leave out the black planes and the red plane (in which there are no primes other than 3, which is an exception - it isn't a twin because it is only on one red plane. )

So we start with this pattern:



4n+1
4n+3
9n+1
1
19
9n+1
1
19
9n+4
13
31
9n+4
13
31
9n+5
5
23
9n+7
25
7
9n+7
25
7

Here, the numbers in the green and yellow planes up to 900 have been rearranged by their residue mod 25 (picture this as 25 slices of a cuboid):


25n+2, 25n+12, 25n+17 and 25n+22 are black planes as they can't contain the higher of two twin primes. 25n+5 is red, 25n+7 is yellow.

Next, we are going to substitute:

25n+3 for 25n+2
25n+13 for 25n+12
25n+18 for 25n+17
25n+ 23 for 25n+22


I've highlighted 5 - this is the only number on this grid that won't appear on any more red or yellow planes. There are two instances of 7 (one of which is highlighted) - these will both be on the 49+7 red plane in the next dimension and then no other red planes.

The first prime that is a non-twin is 11 - this has already been removed from the pattern when we coloured the 9n+2 plane black - we chose to repeat the 9n+1 plane, so you could see the second instance of 19 as a replacement for 11.

Every number that is only in one red plane when this process is reiterated in infinite dimensions will also be on only one yellow plane, so we can treat the yellow plane as being the same as a green plane.*

Given this, the intersection of green, black and red planes in the grid above is the same topological pattern as we would find if we were looking only for primes, but we have multiple repetitions of individual numbers within the pattern.

Also, I talk about rearranging the numbers according to modulo residue above - it would maybe be better to visualise this as a hypercuboid that from the start contains duplications of some planes that aren't either pn or pn+2  and doesn't include any pn+2 planes other than the (p^2)n+p+2 planes.

Hope that all makes sense?

In theory we need to make these plane substitutions in every dimension - I do have one or two thoughts on why that might be problematic, I'll come back to talk about that soon.

*See the algebra in part 7 of the original proof.