Draft Paper on Patterns in Prime Numbers

*** March 2012 Update ***

This particular post on prime numbers seems to attract a fair bit of casual interest. It was written very early in my naive investigation of prime numbers (which remains fairly naive and perhaps a bit inept). People who stumble across this particular post might find some of the more recent work to be fairly interesting. Here are some of the more current posts:

k-tuples within primorials part 1
k-tuples within primorials part 2 (some corrections)
predicted k-tuples
more efficient erathosthenes sieve?
recursive pattern in developing the primes


A Postulate about Patterns, Symmetry and Periodicity in

the Distribution of non-primes and Possible Primes

Pete Quinn, BGC Engineering Inc., Victoria, BC, Canada

John Quinn, Carleton University, Ottawa, ON, Canada

ABSTRACT.  This paper suggests that recurring patterns of non-primes and possible primes exist for all primorials, Pn#, where Pn is the nth prime.  Further, it is suggested that the pattern of non-primes and possible primes is symmetric within Pn#.  The process for determining the pattern of non-primes and possible primes is explained.  These recurring symmetric patterns can be used to isolate all primes to Pn#, representing a significant advance on existing simple sieving techniques.



The distribution of prime numbers has been a topic of considerable interest to mathematicians throughout history.  In recent years, the topic has gained particular practical importance, as modern public key encryption methods rely on use of very large prime numbers, and the difficulty in discovering them directly.  Various methods are available to look for prime numbers, including simple sieving techniques such as the sieve of Erasthothenes.  Prior research has identified and exploited patterns in non-prime distribution evident in small primorials, such as 6, where 6 = P2# = 3#.  Visualization efforts reveal that similar recurring patterns exist for larger primorials, and are postulated to exist for all primorials.  Further, these recurring patterns are all symmetric within the primorial, and this symmetry can be used to advantage.  This paper proposes a new sieving method that capitalizes on observed recurring symmetric patterns in the distribution of non-primes and possible primes within every primorial grouping.



All prime numbers other than 2 conform to the infinitely repeating distribution 1,0, where “1” implies a number may be prime (i.e. is a “possible prime”) and “0” implies that a number cannot be prime.  This is the same as saying that, apart from the special case of 2, all even numbers are not prime, all prime numbers are odd, and, in the absence of further information, all odd numbers are candidates to be checked for primacy.  This rule may be used to screen out potential candidates when looking for prime numbers.  It is simple, easy to propagate forward, and easy to accept as a given.  However, on its own it is not particularly helpful in isolating primes, particularly as Pn grows large, since it leave 50% of all numbers as possible primes to be checked or ruled out by other means.

It is similarly well known that a six number pattern, 1,0,0,0,1,0, possesses a similar recurrence to infinity; in every group of six numbers, the 2nd, 3rd, 4th and 6th are automatically excluded as primes, and the 1st and 5th represent the position of possible primes.  All prime numbers must conform to this rule, so all prime numbers fall as the 1st or 5th numbers in a series of six; however, not all of the 1st and 5th numbers are prime.

The literature also includes references to patterns involving repetitions of 30 number sequences, or 1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0.  A common thread between these three sets of repetitive patterns is that they are based on groups of numbers defined by the first three primorials, or products of successive prime numbers: P1#, P2# and P3#, or 2, 6 and 30, where the primorial for Pn is defined as . 

A second common thread is that all three patterns are symmetric about Pn#/2.  For example, 1 is symmetric about 1 (P1#/2), the 6 number pattern 1,0,0,0,1,0 is symmetric about 3, and the 30 number sequence is symmetric about 15.

A third common thread is that each pattern of non-primes and possible primes within recurring groups of Pn# successive integers is based on the Pn repetition of the Pn-1 pattern (or Pn-1 sieve, for convenience), followed by removal of all prime products of Pn between Pn-1# and Pn#.  This will involve products of Pn with prime numbers between Pn and Pn-1#; however, one can take advantage of symmetry, obtain the prime products up to Pn#/2, and then reflect the result.

It is postulated here, but not proven, that these same essential common elements continue for all Pn.  The following paragraphs and Figures illustrate the observed patterns for the first several values of Pn.  The subsequent section illustrates how these patterns might be exploited for finding primes.

Figure 1 presents the distribution of the first 18 prime numbers within successive groups of six consecutive whole numbers.  In this graph and all the similar graphs, the coordinates have been obtained by determining (N mod Pn#) for the x-value, and truncating (N/Pn# + 1) for the y-value.

Figure 2 shows the distribution of the first 100,000 prime numbers according to the same representation.  Other than 2 and 3, the two primes involved in obtaining P2#, the remaining primes all fall in two possible locations, which are symmetric about P2 (i.e. 3), 1 or 5.  This simple pattern represents the very simple fact that, apart from 2 and 3, no prime may be even (a multiple or two) or a multiple of 3.

Figure 1.  First 18 prime numbers distributed through (mod 6)

Figure 2.  First 100,000 prime numbers distributed through (mod 6)

Figures 3 and 4 illustrate similar patterns for the distribution of prime numbers within groups of 30, P3#.  For comparison, the possible prime locations inferred from P2#, or the P2# sieve, are shown repeating across groups of 6, and actual primes up to 30 are shown along the bottom.  One can see that the periodicity developed for P2#, with primes possible at 1st and 5th positions with groups of 6, is preserved, but additional possibilities have been removed.  The P2# pattern, or P2# sieve, can be used as a starting point to identify possible primes within P3#.  By careful inspection, one can determine that the newly removed possibilities, 5 and 25, represent the complete set of prime multiples of 5, P3, between P3 and P3#.  Deleting these from the recurring P2# sieve yields the full set of possible primes for P3#, providing the P3# sieve.  In this unique case, removing the P3 prime products also removes all non-primes up to 30.  For subsequent Pn#, it is necessary to remove prime products of primes higher than Pn to remove all non-primes to Pn#.

Figure 3.  First 45 primes distributed through (mod 30)

Figure 4.  First 100,000 primes distributed through (mod 30)

Figure 5 shows the first 100,000 primes distributed through (mod 210), or within groups of P4#, or 7#.  The (mod 30) sieve is also repeated across the top for comparison, along with actual primes up to 210 along the bottom, for comparison.  All possible primes within repetitions of 210 fall within the possibilities suggested by the (mod 30) sieve; however, selected possibilities have again been removed.  In this case, the following possibilities no longer exist: 7, 49, 77, 91, 119, 133, 161 and 203.  These represent multiples of 7 by 1, 7, 11, 13, 17, 19, 23 and 29, or 1 plus all primes from P4 to P3#.

By inspection, the distribution of possible primes remains symmetric about P4#/2.  Since the 7-fold repetition of the symmetric P3# sieve must also be symmetric about P4#/2, it follows that the possible primes removed to obtain the P4# sieve must also be likewise symmetric.

The P4# sieve, once developed as described above, may now be repeated P5 times as the first step in identifying the distribution of possible primes within repeating groups of P5#, or 2310.  First however, one could examine the distribution of actual prime numbers to 210, which in this case differs from the possible primes within P4# groups, or the P4# sieve.  The following additional numbers have been removed from the P4# sieve to leave only prime numbers to 210: 121, 143, 169 and 209.  These are all products of prime numbers higher than 7, yielding products less than 210.  Note there is no evident symmetry in the distribution of these numbers, nor is there symmetry in the distribution of prime numbers to 210.  The obvious recurring symmetric patterns are limited to non-primes and possible primes.

Figure 5.  First 100,000 primes distributed through (mod 210)

Similar distributions of prime numbers can be generated for any larger Pn# following the same general processes, yielding symmetric patterns of possible primes and non-primes that can be further vetted to leave only prime numbers through a simple generation of all possible combinations of prime products less than Pn# involving prime numbers larger than Pn

Figure 6 shows the distribution of primes for P5#, or 2310.  A simple check reveals that the distribution of possible primes and non-primes remains symmetric.  Obtaining the P5# sieve from the 11-fold repetition of the P4# sieve requires the removal of all prime products of 11.  In this case, products of more than two primes are required, but for obtaining the P5# sieve, all of these prime products must include 11 at least once.  Recalling symmetry, this step can be simplified by only obtaining prime products of 11 up to 1155, and then reflecting the result about 1155.

The graphs for larger Pn# values are not presented, as the existing patterns are not visibly apparent at practical plotting scales; however, the same symmetry exists in the distribution of non-primes and possible primes, and the same simple processes can be used to obtain this distribution and to then obtain the primes up to Pn#.  Note that in obtaining the primes to Pn#, it is accepted that the primes to P(n-1)# have already been confirmed, and so the methodical process of removing additional prime products seeks to identify new primes from P(n-1)# to Pn#.

Figure 6.  First 100,000 primes distributed through (mod 2310)

The development of new patterns with increasing Pn follows predictable patterns as illustrated in Table 1.  The number of possible primes grows with Pn following a predictable progression defined by the product of all values of (Pn -1) up to Pn.    In other words, when a given primorial sieve for Pn# is repeated P(n+1) times as the starting point for determining the P(n+1)# sieve, a total of P(n+1) unique prime products of P(n+1) are eliminated to obtain the higher sieve.

Ordinal, n nth prime, Pn nth primorial, Pn# Number of primes to Pn# Largest prime to Pn# Possible Primes from Pn# sieve
1 2 2 1 2 1
2 3 6 3 5 2
3 5 30 10 29 8
4 7 210 46 199 48
5 11 2310 342 2309 480
6 13 30030 3248 30029 5760
7 17 510510 42331 510481 92160

Table 1.  Growth of patterns of non-primes and possible primes



It should now be evident that the process for isolating prime numbers on the basis of recurring symmetric patterns within groups of successive numbers Pn# long is straightforward, as has been explained for Pn# up to 2310 in the preceding section.  To obtain the primes for some arbitrary larger Pn#, it is necessary first to know all primes up to P(n-1)#.  It would be convenient to also have the P(n-1)# sieve, but not necessary as this can be obtained from the primes to P(n-1)#.

To obtain the P(n-1)# sieve, take the list of primes to P(n-1)# and collapse it onto itself P(n-1) times to a single list of possibilities within P(n-2)#, from which we can directly infer the P(n-2)# sieve.  Recall now that the process for obtaining the P(n-1)# sieve is to simply repeat the smaller sieve P(n-1) times, then remove all prime products of P(n-1) that fall between P(n-2)# and P(n-1)#.  Recall again that we only need remove the prime products to P(n-1)#/2, and can then reflect these about P(n-1)#/2 to obtain the complete list of relevant prime products of P(n-1).

With the P(n-1)# sieve established, we now generate the Pn# sieve in the same fashion, first repeating the P(n-1)# sieve Pn times, then removing all prime products of Pn.  The final step to obtain the primes to Pn# is to remove the additional prime products of primes greater than Pn less than Pn#.



This paper has described the existence of recurring symmetric patterns in the distribution of non-primes and possible primes based on primorials.  The observed patterns have been used to develop a simple technique for isolating all prime numbers up to a given primorial value.

As Pn# becomes arbitrarily large, this process becomes progressively more cumbersome; however, it is believed to represent a substantial simplification of more basic sieving techniques such as the sieve of Erathstothenes.  The potential differences in computational complexity are beyond the scope of this paper, but may be of interest to others to check.  It is believed that a mathematical description of the described recurring symmetric patterns, which is left for others, may lead to other simplifications of existing techniques for identifying very large primes.



This work was first inspired by a lecture on cryptography given during a visit to the University of Waterloo, attended by the second author, resulting in an interest in the distribution of primes.  The first author developed an interest after stumbling across Ulam’s Spiral in The Math Book by Clifford Pickover.  The patterns were discovered by accident when programming Ulam’s spiral in a spreadsheet proved more than a few minute job, so instead the primes were plotted in successive circles, with 360 possibilities for each circle.  Since 360 is a multiple of a primorial, 30, a beautiful pattern appeared, leading to a search for further patterns.


Ayres and Castro, 2005, Hidden Structure in the randomness of Prime Number sequence?

Cattani, 2010, Fractal Patterns in the Prime Number Distribution

Gibbs, 2008, The Double-Helix Pattern of Prime Number Growth

Grainville, 2008, Prime Number Patterns

Pickover, 2010?, The Math Book


About petequinn

I'm a Canadian geotechnical engineer specializing in the study of landslides. I started this page to discuss some mathematical topics that interest me, initially this involved mostly prime numbers, but more recently I've diverted focus back to a number of topics of interest in geotechnique, geographic information systems and risk. I completed undergraduate training in engineering physics at Royal Military College (Kingston, Ontario), did a masters degree in civil (geotechnical) engineering at University of British Columbia (Vancouver), and doctorate in geological engineering at Queen's University (Kingston). I was a military engineer for several years at the beginning of my career, and did design and construction work across Canada and abroad. I've worked a few years for the federal government managing large environmental clean up projects in Canada's arctic, and I've worked across Canada, on both coasts and in the middle, as a consulting geotechnical engineer. My work has taken me everywhere in Canada's north, to most major Canadian cities and many small Canadian towns, and to Alaska, Chile, Bermuda, the Caribbean, Germany, Norway, Sweden, Bosnia, and Croatia. My main "hobby" is competitive distance running, which I may write about in future.
This entry was posted in Prime Numbers. Bookmark the permalink.

18 Responses to Draft Paper on Patterns in Prime Numbers

  1. Hugh says:

    Hi Pete,

    I just left you a note on Tao#s blog, but thought it would be quicker to leave it here:

    What you’re saying about prime patterns seems basically correct to me.

    See my blog for a related attempt to prove the twin prime conjecture, which relies on symmetrical primorial patterns..http://barkerhugh.blogspot.com/

  2. Hugh says:

    Hi Pete,

    One quick thing to think about – the patterns you are looking at can be seen in a purer form if you isolate either the 6n-1 or 6n+1 number lines. Within these you can see an identical pattern of 5-multiples and 7-multiples running from 35 to 245 and 175 to 385.

    This basic repeating pattern does create a symmetrical pattern in the combined number lines, but it is more clear that it is a fractal pattern if you look at them separately.


  3. petequinn says:

    Hugh, I’m not sure I follow…?

  4. Hugh says:

    I mean take all numbers that can be expressed as 6n-1 – 5,11,17 etc

    Then look at the pattern of 5-multiples and 7-multiples within that line.
    3541 47 53 59 65 71 77 83 89 95 101 107 113 119 125 131 137 143
    149 155 161 167 173 179 185 191 197 203 209 215 221 227 233 239 245

    (crosses fingers that formatting looks OK…)

    This is a much purer symmetry (and more obviously fractal) than the overall pattern from 0 to 210 because there is one 5-multiple every 5 spaces, one 7-multiple every 7 spaces…

    This pattern repeats from 175 to 285 in the 6n+1 number line (7, 13, 19…)

    What you see from 0 to 210 is a symmetrical pattern, but it kind of lays these two patterns on top of each other – I think it’s helpful to see them separately.

    On my blog, the last post I made about primorial fractal patterns explains this at more length.

  5. Hugh says:

    Oh, I meant 175 to 385 in the 6n+1 line…

  6. Hi,
    This is satish kumar singh.I am working in field of prime number.My thinking or way of approach is similar to yours.I want a demonstration of it .Will u suggest me the way.




    • petequinn says:

      Hi Satish, sorry for the tardy reply, I haven’t checked this in a while, and have been absorbed by work.

      I’m not sure exactly what you’re asking me for, as far as a suggestion is concerned, nor am I sure I can help. But can you maybe explain your question a bit more completely?



  7. Ernie says:


    You might be interested in this paper to see the ratio of growth stabilize between the two poles:


  8. satish kumar singh says:

    My question is that, is it any pseudo pattern gives prime number in proper range? If some set of number can give you each and every prime number in fixed range? Range is like this

    2 to 4

    3 to 9

    5 to 25

    11 to 121

    13 to 169




    n to n*n

    I have way to find out prime number. It is simple. Most important things is that its not a time taking. Just i will have to subtract a unique set of number from fixed number.
    example no 1 ( This give us prime no grater then equal to 11 and less then equal to 121).
    210- 97=113
    I can find out any prime number.
    I have used unique set of number and subtract it from fixed number as in example no 1.

    example no 2.( This give us prime no grater then equal to 13 and less then equal to 169)

    Sir I can find any prime number of multi digits. But calculating limit of computer do not allow me to work further. So please help me in this regards.

    Sir i had already solved so many things in prime number representation is required.
    So my request is if possible plz suggest me the platform where i can represent it.

  9. satish kumar singh says:

    Prime No Even N0 Prime No-Even No=Prime No
    427 420 7
    431 420 11
    433 420 13
    437 420 17
    439 420 19
    443 420 23
    449 420 29
    451 420 31
    457 420 37
    461 420 41
    463 420 43
    467 420 47

    Prime No Even N0 Prime No-Even No=Prime No
    457 450 7
    461 450 11
    463 450 13
    467 450 17
    469 450 19
    473 450 23
    479 450 29
    481 450 31
    487 450 37
    491 450 41
    493 450 43
    497 450 47

    Prime No Even N0 Prime No-Even No=Prime No
    487 480 7
    491 480 11
    493 480 13
    497 480 17
    499 480 19
    503 480 23
    509 480 29
    511 480 31
    517 480 37
    521 480 41
    523 480 43
    527 480 47

    Prime No Even N0 Prime No-Even No=Prime No
    517 510 7
    521 510 11
    523 510 13
    527 510 17
    529 510 19
    533 510 23
    539 510 29
    541 510 31
    547 510 37
    551 510 41
    553 510 43
    557 510 47

  10. satish kumar singh says:

    Same way
    Can we find out prime number same fashion
    Prime NO Even no Prime NO-Even no= Prime No
    5 2 3
    7 2 5
    11 6 5
    13 6 7
    17 6 11
    19 6 13
    23 6 17
    29 6 23
    37 30 7
    41 30 11
    43 30 13
    47 30 17
    53 30 23
    59 30 29
    61 30 31
    67 30 37
    71 30 41
    73 30 43
    223 210 13
    227 210 17
    229 210 19
    233 210 23
    239 210 29
    241 210 31
    251 210 41
    257 210 47
    263 210 53
    269 210 59
    271 210 61
    277 210 67
    281 210 71
    283 210 73
    293 210 83
    307 210 97
    311 210 101
    313 210 103
    317 210 107
    2333 2310 23
    2339 2310 29
    2341 2310 31
    2347 2310 37
    2351 2310 41
    2357 2310 47
    2371 2310 61
    2377 2310 67
    2381 2310 71
    2383 2310 73
    2389 2310 79
    2393 2310 83
    2399 2310 89
    2411 2310 101
    2417 2310 107
    2423 2310 113
    2437 2310 127
    2441 2310 131
    2447 2310 137
    2459 2310 149
    2467 2310 157
    2473 2310 163
    2477 2310 167
    30047 30030 17
    30059 30030 29
    30071 30030 41
    30089 30030 59
    30091 30030 61
    30097 30030 67
    30103 30030 73
    30109 30030 79
    30113 30030 83
    30119 30030 89
    30133 30030 103
    30137 30030 107
    30139 30030 109
    30161 30030 131
    30169 30030 139
    30181 30030 151
    30187 30030 157
    30197 30030 167
    30203 30030 173
    30211 30030 181
    30223 30030 193
    30241 30030 211
    30253 30030 223
    30259 30030 229
    30269 30030 239
    30271 30030 241
    30293 30030 263
    30307 30030 277
    30313 30030 283
    30319 30030 289

    Satish kumar singh

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s