Let’s start at the beginning…..

Let me give you two analogies to start your understanding:

A) Integers are either composite or prime; think of their relationship rather like a block print and the resulting print: they both have patterns on them but it is the resulting print that we all look at and admire; we look at the block and can make no sense of it.

Humans have been looking at the prime “print” for a long time and made little sense of it; my answer is to look at the composites – it is quite eye-opening!

B) The prime pattern is an interference pattern between waves; you can find references to music and diagrams of waves but few appear to  have taken if far. This is another line of attach worth examining but only after A)

In summary, what have I to report:

  1. The prime “pattern” expressed by prime numbers is in fact a composite of one to many individual patterns, each arising from a string of composites…..derived from each prime number – there is one relatively “simple” pattern for each prime number – OK not so simple and only the early few are short.
  2. The prime “pattern” is of a stepped nature so it starts simple (2,3….how more simple do you want it…..5….7?) and gets more complex with each step. The steps are at Pi2.
  3. Each “pattern” of composites that contribute to the overall “pattern” are of length Pi#.
  4. Each “pattern” of composites does not come into effect at Pi2. Each starts at Pi2  + a variable multiple of Pi.
  5. There is a drawbridge effect so that the overall pattern “progresses” and the distribution of the smaller primes are too simple to be included in the pattern for larger primes. This is one of the main reasons why virtually every rule for the primes we can define has an exception…..e.g. all primes are odd EXCEPT 2!
Posted in Prime Number Distribution | Leave a comment

Start here…..Composite arrays or more strictly helices

Starting an analysis of prime numbers from the composites is something that some number theory books start and then dismiss once the complexities are considered in detail: however in theory, on the basis that composites are relatively straight forward they can be counted and their number subtracted from the total integer count to yield the number of primes. Easy!

A practical difficulty kicks in quickly – well two difficulties actually:

  1. It’s not as simple as counting each multiple of 2,3,5,7,11 etc..separately (i.e. each prime number or factor) as all composites (other than squares) are the result of multiplying two different primes so can be expressed more than once; thus 6 = 2 x 3 =3 x 2 and so could be counted as a multiple of 2 and a multiple of 3. As another example 60 = 2 x 2 x 3 x 5 could be counted as a multiple of 2, 3 and 5. An adjustment is required.
  2. The first factor leads to a second related difficulty in that no composites need to be counted against any prime factor Pi  where c < Pi2   . Thus for prime factor 5 the first composite not already accounted for by prime factors 2 and 3 is 25. The next is 35. Smaller composites such as 10, 15, 20 and 30 are also multiples of 2 or 3 or both.
  3. Once the second factor is taken into consideration we don’t need to worry about adjusting any count for primes themselves.

So let’s make an adjustment for these two difficulties, assuming we start with the smallest prime factor 2 and work upwards:

The number of composites from 2 starts with 4 and continues with every larger even number: as a series these can be expressed as 2n+2 (i.e. where n=1 the term is 4) or counting from the integers as a whole n = I/2 – 1 or (I-2)/2


I=4  n=1

I=6  n=2

Thus is we wish to count the number of composites of 2 less than an integer I, we can use I/2 – 1.


We can then count the number of composites from prime factor 3. These start with 9 and continue with every odd multiple of three (the even ones were all accounted for as multiples of 2. The formula 6n+3 applies (i.e. where n=1 the term is 9).

To count the multiples based on integer I we use the formula (I-3)/6.

Combining the count for prime factors 2 and 3 gives a formula of 2(I-3)/3 where the formula produces a whole integer.

Can we continue with this approach? Trouble is, we cannot (easily) as the composites for prime factor 5 (and larger factors) are not uniformly distributed 25,35, 55,65 etc. For easy formulas we need to consider two separate formulas; for prime factors 7 and above we need multiple formulas….the number of which amazingly relate to Euler (see elsewhere).

At this point we need to take a closer examination of the unique composites associated with each prime factor. In the paragraph above the start of the sequence associated with prime factor are listed. As will be seen they occur in pairs and are 30 apart; as will be seen elsewhere these define the well known 6n+1/-1 formula (divide them by 5 if you cannot wait, but one of the tricks is to work out where exactly the series starts).

Things start to get a little “clearer” (maybe complex is a better word initially, but clearer can be used in retrospect) when we look at the unique composites associated with prime factor 7.

With no surprise they start at 49 but then continue in what at first appears a little random.

49,  77,  91, 119, 133, 161, 203, 217, 287, 301, 329, 343, 371, 413, 427

It’s only when you arrange them that you start to see a bit of structure


77,  91, 119, 133, 161, 203, 217, 259

287, 301, 329, 343, 371, 413, 427, 469

putting 49 to one side you can see that the positions of the composites are in rows of 8 with a repeat at intervals of 210. You can keep going for as long as you want; after all the pattern is a result of an interaction of the four prime factors – 2, 3, 5 and 7 – nothing else so this is pretty simple.

If you are interested in the Online Sequence of Integers https://oeis.org/ this sequence is labelled A063163 and defined as “Composite numbers which in base 7 contain their largest proper factor as a substring”.

We can do this analysis for each subsequent prime factor.

We find that for every prime number pi  there is an associated array of composite numbers that consist of the composites derived from pi  and larger prime factors but does not include any composites with a prime factor of por less.

Each sequence of composites are well defined and can be considered to be arranged in a helix but the start of each subsequent helix is off-set by one prime factor.

The first two “helices” (for prime factors 2 and 3) are trivial in that they each consist of a single line of integers (4,6,8,10 etc and 9,15,21,27 etc). Only with that for prime factor 5 does the helix start to show us some of its features with two lines of integers, but it takes examination of the fourth and fifth before a fuller picture emerges…..and if you have got this far and wondered what this is going to tell you about prime number distribution, just be patient!

There are three dimensions I can give for each of these composite helices:

  1. there are  (Pi-1 – 1)# elements in each turn of the helix
  2. the strands of the helix are pi # apart
  3. each helix has a line of symmetry at p#/2

So here is a starting table (sorry for the limitations of posting a table in wordpress):

pi        No of elements in 1st column  Gap between columns   Line of symmetry

3                1                                                6
5                2                                               30                                         15
7                8                                               210                                       105
11              48                                             2310                                     1155
13             480                                           30030                                  15015
______(Pi-1 – 1)#                                   p#                                          p#/2

OEIS      A005867                                A002110                                A070826

For those who have explored the prime numbers the above framework may appear familiar. However, arrays of composite numbers, by themselves tell us very little about the primes. You have to move onto the secondary arrays to get an inkling on what is going on…..see “Secondary arrays“.

But before moving on we need to examine the composite integers that sit on the above arrays or frameworks. As above it is useful to refer to the Online Encylopedia of Integer Sequences (OEIS) rather than listing long lists of integers: however, there are a number of differences with regards to starting points. I haven’t been too careful on this front so I expect some quality control might be useful.

So, for the composite integers that “sit” on the above frameworks:

OEIS sequence A083140 contains a pretty good summary of the early sequences,  but of course the arrays are not acknowledged. The following OEIS sequences make up A083140 but in this context you have to leave off both the first prime number and the second term of the prime squared:

2 4 6 8 10 12 14 16 18 20 22 24 .... (A005843)

3 9 15 21 27 33 39 45 51 57 63 69 .... (A016945)

5 25 35 55 65 85 95 115 125 145 155 175 .... (A084967)

7 49 77 91 119 133 161 203 217 259 287 301 .... (A084968)

11 121 143 187 209 253 319 341 407 451 473 517 .... (A084969)

13 169 221 247 299 377 403 481 533 559 611 689 .... (A084970)


Thus the repetitive array for prime number 7 starts with 77 and the second column of the array starts with 77 + 210 = 287. Thus the composite array as a whole reads:

77   287   497   707   917   1127   1337   1547

91   301   511   721   931   1141   1351   1561

119   329   539   749   959   1169   1379   1589

133   343   553   763   973   1183   1393   1603

161   371   581   791   1001   1211   1421   1631

203   413   623   833   1043   1253   1463   1673

217   427   637   847   1057   1267   1477   1687

259   469   679   889   1099   1309   1519   1729


As you can see there are 8 rows of integers, and each item in each row is spaced at 210; however, the “line of symmetry” at 105 is not in the middle. One has to rearrange the array to “see” it – two lines need to be brought to the top of the array and offset:



____217   427   637   847   1057   1267   1477   1687

____259   469   679   889   1099   1309   1519   1729

77   287   497   707   917   1127   1337   1547

91   301   511   721   931   1141   1351   1561

————–line of symmetry————————

119   329   539   749   959   1169   1379   1589

133   343   553   763   973   1183   1393   1603

161   371   581   791   1001   1211   1421   1631

203   413   623   833   1043   1253   1463   1673


(Offsetting or steps is something one gets used to with primes, but we’re not on the primes yet!)


So now if one measures the distance of each of the eight rows from a line starting with p#/2 you will see the rows are spaced at equal distances from the mid-line:

-98 (the distance between 217 and 315)

-56 (the distance between 259 and 315)



+14 (=2 x 7)

+28 (= 4 x 7)

+56 (=8 x 7)

+98 (= 14 x 7)


So, an array of equal spaced composite numbers is not too exciting is it? Just keep following – it gets much more interesting: see “Secondary arrays













Posted in Counting the Composites | Leave a comment


Prime Number distribution has been a source of fascination to both professional and amateur mathematicians for many years. The distribution is easy to explain, and conceptually easy to understand, once explained, but almost impossible to see if one looks just at the prime numbers themselves.

I believe that considering prime numbers as fundamental may have stood in the way of understand prime number distribution as their distribution is the result of composite number patterns, and the interference of these simple patterns that leads to the relative complexity of patterns in the primes.

The picture above of the two rows of trees in an avenue is not by chance. If the row of trees at one prime spacing combines with the row of trees at a different prime spacing one gets a combined pattern. Primes are just the left overs after all composite patterns have been taken into account.

Imagine two waves – one of wavelength 2 and one of wavelength 3; consider their interference pattern after 9 (for <9 see later). A familiar pattern emerges: at intervals of 6 three integers are multiples of 2 and two of 3; the resultant left overs (or potential primes) occur in pairs: thus 11,13 followed by 17,19 etc. The occurrence of pairs of primes are one of the noteworthy features of the prime series, and they occur simply as a result of first two primes. As factors of higher primes kick in (see later) the numbers of pairs declines. The question are their more potential pairs than there are multiples of higher primes (in which case pairs of primes continue indefinitely) or are there more multiples of higher primes than potential pairs (in which case pairs of primes disappear, but at what point?)

So what are the steps in understanding? Firstly, whilst primes may be the building blocks for integers, their pattern is determined by the composites. Prime distribution is determined not by one simple pattern, but a changing pattern that becomes more complex as integer number increases and in an infinite way. Secondly, the overall pattern is a composite of what are relatively simple patterns, each produced by a single prime factor. Thirdly, the composite patterns come into play at different starting points.

That’s about it. Once you have these concepts and the details (see below), prime number distribution is easy to explain……however, once you realise that the “simple” patterns become very long, very quickly you will see why visualisation of any pattern is simply beyond the capacity of the simple human brain.

You can also explain why repeatable patterns do occur in the primes, and where they come from!

Thus the overall pattern between 4 and 9 is not the same as it is between 9 and 25.

Also smaller prime factors influence the arrangement of the pattern of larger prime numbers.

Thus by integer 25 the component pattern that joins the overall prime pattern repeats itself at a length of 30 (2x3x5); however, the repeating patern only starts at 35 (not 25), whilst at integer 49 another component joins with a repetition stretching to 210 (2x3x5x7) but the repeating pattern only starts at 77 (=49+4*7). By the time you get to 121 you’re looking at a further pattern being added with a repeating pattern of length 2,310.

I hope these short paragraphs give you a little more insight into how prime numbers are distributed. Feel free to rate any pages you find useful, or comment.

Posted in Patterns, Prime Formula, Prime Number Distribution | Tagged , | 1 Comment

Euler’s phi function 2,8,48, 480, 5760

It doesn’t take too much delving around with the primes to come across the appearance of Euler’s totient or phi function. It oozes out of the primes in a variety of locations.

Firstly the composite helices and thus the prime helices each have a “width”. The width of the 6n+/-1 helix associated with prime factor 5 is 2. The width of the next helix associated with prime factor 7 is 8. The next is 48 and the conjecture is that this continues:




Secondly, considering the balance of primes to composites as each prime factor is used to calculate which are composite and which are potentially prime we see a simple pattern:

Each block is pi# integers long,

Each block has (pi   – 1) # (potential) primes &  (pi-1 -1)# composites

Thus the ratio of

primes to all integers:    (pi   – 1) # /  pi#

primes to composites       (pi   – 1) # / (pi-1 -1) # = pi   – 1


Posted in Prime Number Distribution | Leave a comment

What’s the problem?

We want to define the prime numbers as a logical sequence with a workable formula for the nth term and a means of establishing what n is when we have a given integer. As such we should then be able to distinguish prime numbers from composites.

Barriers to doing this:

i) whilst the general trend of the primes becoming less frequent with increasing n is well known the frequency does not decrease uniformly; the terms appear to pulse with both gaps and areas of higher frequency.

ii) the well known twin primes (but no triplets (see Counting the Twins)

iii) the well known gaps – with evidence of increasing gaps with increasing n

Primes have been described as random, unruly, baffling reflecting the frustration of the observer; there has also been commentary on harmony, music and other references to spirals, waves and the like. Just what is going on? Explainable or inexplicable?

In addition there are several well known observations about the primes:

Almost all rules/observations require an exception e.g.

  1. all primes are odd, except 2. So even the simplest description has an exception!
  2. all primes are separate, except 2 & 3.

Which leads onto a more general problem:

  1. rules for smaller primes may not apply to all (i.e. larger) primes
  2. rules that appear to apply require exceptions of smaller primes

As you will read in this blog once one understands the nature of the prime number problem and the inherent complexity, things become clearer, at least conceptually. Understanding that structure gives me some confidence to predict that there will never be a practical prime formula and since I can say why. However, there does seem to be a way of counting primes – but not every prime – and thus making some sense of things.

The startling thing is that the analysis is relatively simple…….


Posted in Prime Number Distribution | Leave a comment

Counting the primes

One of the key missing elements of the prime number sequence is the ability to identify the th  term in the sequence. That works two ways – can we calculate the  th  term and if we have a prime number can we identify its position in the sequence?

This blog has shown how it is possible to lay out specific composite numbers in a series of arrays or helices. Each array/helix is related to a specific prime number and the composite numbers in each array/helix are prime multiples of that specific prime number. The composite array/helix can be translated into a secondary array/helix by dividing each composite by the specific prime number. The secondary array is rich in prime numbers and the composites that fill the gaps in the secondary array are all multiples of the specific prime number and all larger prime numbers (i.e. multiples of smaller primes are excluded). The important thing to bear in mind is that ALL primes larger than the specific prime number are included AND that the primes are arranged in an array. With a little careful transfer of “lines” (i.e. rows or columns depending on how you have arranged them) a “line of symmetry” at p#/2 runs through the middle of each secondary array/helix.

The next thing to bear in mind is the number of positions in the each array/helix. This is crucial to counting primes and identifying the  th  term. The number is the same for both primary (i.e. composite) and secondary (i.e. prime rich) array.

So the array associated with prime number 5 has a mere 2 positions. As we have seen this leads to the well known 6n+/-1 formula.

The array associated with prime number 7 has 8 positions. Due to the absence of composites in the secondary array (i.e. the first composite appearing is 49) we can count the primes:

The array – associated with prime number 7, the fourth prime number – starts with 11, which is the fifth prime number (i.e. +1 from 4 to 5). We know there are 8 lines in the array so the first prime number in the second line will be the 13th prime number. Based on the more advanced/larger arrays we cannot predict exactly what the 13th prime number will be but we do know that the NEXT prime number will be the 13th. In this case the next prime is + 5#=30 i.e. 11 + 30 = 41.

Moving on we can see that adding  pi   to pi-1 #   gives a good way of counting the primes as we know the number of primes separating pi    from pi  + pi-1 #  .



Looking at the first prime in the second row of each array/helix:

13th prime is 41

48th prime is 223

345th prime is 2327……except that 2327 is not prime: 2333 is the 345th prime so you will need to see the table to see what it provides

3,250 etc….









Meanwhile the series 13, 48, 345, 3250, 42333 is not registered on OEIS so maybe no one has got here yet?


Meanwhile I have found out that Microsoft Excel starts to be of little use if you need more than around 15 significant digits so this is as far as I can go:

The 9,414,916,809,097th prime number is the first prime number after 304,250,263,527,257.

I can make a stab at both the

362,597,750,396,746th prime number

and the 1,539,772,852,781,310th prime number

but excel being excel and I have also reached the limit of primes.utm.edu




Posted in Counting the Composites, Counting the Primes | 2 Comments

Secondary arrays

This element needs to be read after that titled “Composite arrays“.

A secondary array of integers (a mix of primes and composites) emerges by dividing the associated composite array by Pn  i.e. by the prime number “associated” with that composite array. Remember, the array is still in place but this time, whilst there are still composites in the array, a remarkable thing happens – all the prime numbers Pn and greater emerge. On contemplation, a mix of primes and composites may not seem very enlightening. However, it appears that the composites are “disappearing” faster than the primes.

Let’s look at the secondary array associated with prime number 5:

The composite array consists of


55  85   115   145

65  95   125  155

The resulting secondary array consists of two rows with a gap of 6 between the columns

11   17    23   29

13   19   25   31

This is recognizable by the well known 6n+1 and 6n-1 algorithm that contains all primes. It appears to be less well known that there is an infinite number of such arrays (one for each prime) arising from this process.

Let’s look at the secondary array that arises from prime number 7. The composite array is shown under the composite array blog so if we divide each term by 7 we are left with

11   41   71   101   131   161   191   221

13   43   73   103   133   163   193   223

17   47   77   107   137   167   197   227

19   49   79   109   139   169   199   229

23   53   83   113   143   173   203   233

29   59   89   119   149   179   209   239

31   61   91   121   151   181   211   241

37   67   97   127   157   187   217   247

So, we still have eight rows but now the columns/terms are separated by 210/7 i.e. 30. The first column contains only prime numbers but composites creep in at greater frequencies as you move left to right (not surprisingly). However, the composites are not just any old composites – they are an increasingly select bunch  that fill the gaps between primes, which, remember, are in an array – those naughty old primes, often accused of being “random” are in a set matrix at regular intervals. And remember, there is an infinite set of arrays, one for each prime number!

So, let’s do the same as before to see the “line of symmetry: move two lines from bottom to top and offset:

___31   61   91   121   151   181   211   241

___37   67   97   127   157   187   217   247

11   41   71   101   131   161   191   221

13   43   73   103   133   163   193   223

——-line of symmetry at pn-1# i.e. 15——

17   47   77   107   137   167   197   227

19   49   79   109   139   169   199   229

23   53   83   113   143   173   203   233

29   59   89   119   149   179   209   239

Having divided the composite array by 7 the lines are now separated from the line of symmetry by





So an infinite series of arrays with a mix of primes and composites – mysterious perhaps, but not very exciting. Hold one….let’s see what come next: “Milestones in the primes – calculating the n in pn




Posted in Prime Number Distribution | Leave a comment

Counting the prime pairs

Is there an infinite number of prime pairs?

How frequent are prime pairs?

Why are their prime pairs?

Intriguing questions best examined from the composites: why do they exist for starters? Look at the role of prime factors 2 and 3. They lead to the first prime pair 5&7.

Look at the role of prime factors 2, 3 and 5. 41/43 and 59/61 show up, but 37/39 and 53/55 would be pairs without the effects of 13 and 11.

We can show the number of pairs per length of composite numbers thus:

It starts:

PF 2,3: 1 pair for each 5 composites (20% or 40% of composites are one of a pair)

PF 2,3,5: 4 pairs for 30 composites (13.3% or 26.6% of composites are one of a pair)

PF 2,3,5,7: 19 pairs in 210 composites (9.0% or 18.1% of composites are one of a pair)

and so on. Can we establish a formula and work out whether it has an asymmtote?




Posted in Prime Number Distribution | Tagged | Leave a comment