# pattern found in Prime numbers

• posted

Hi,

I found a pattern in the prime numbers, I used an encoded binary sequence, and the pattern became clearly visible:

That's all zeros and ones, depending on if a prime is at the positions given by the formulas:

y = 30x + 1 y = 30x + 7 y = 30x + 11 y = 30x + 13 y = 30x + 17 y = 30x + 19 y = 30x + 23 y = 30x + 29

The pattern can be seen if the zeros and ones are displayed as a bitmap, but only if there is the correct number of columns in the bitmap, and that is the pattern I found, the column count to show the pattern seems to be this for primorial30:

8*prime (where 8 is how many coprimes 30 has)

I tested prime 7 so far, but I think the pattern seen might hold for larger primes too.

When 8*7=56 columns are used ie here are the first 20 rows, all having columns of zeros:

0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,0,1,1,0,1,1,1,0,1,1,1,1,0,0, 1,0,0,1,1,1,1,1,1,0,1,0,1,0,1,1,1,1,1,1,0,0,1,0,0,1,1,1,1,0,0,0,1,1,0,0,1,1,1,1,0,1,0,1,0,1,1,1,0,1,1,0,0,1,0,1, 1,0,1,1,0,1,1,1,0,1,1,1,1,0,0,1,0,1,1,0,0,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,0,1,1,1,1,0,0,1,0,1,1,1,1,0,1,1,1,0,0, 1,0,1,1,1,0,1,1,1,0,0,1,1,0,1,0,1,0,1,0,0,1,0,1,0,1,0,1,0,1,1,0,1,1,1,0,0,1,1,0,0,1,0,0,1,0,0,1,1,0,1,1,1,1,0,1, 0,0,0,1,1,1,1,0,0,1,1,1,1,0,0,0,0,1,1,0,0,1,0,1,0,1,1,0,1,0,1,0,0,1,1,0,1,0,1,0,1,1,0,0,0,1,1,1,1,0,1,1,0,1,0,1, 1,0,1,1,0,1,0,0,0,1,1,1,1,0,1,1,0,1,0,1,0,1,0,0,0,0,1,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,1,0,1,1,1,1,0,0,0,1,0,1, 0,0,0,0,1,1,1,1,1,1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0,1,1,0,1,1,0,0,1,0,0,0,0,1,1,1,1,0,0,1,0,0,0,0,0,0,1,1,1,0,1,0,1,1,1,1,0,0,1,1,0,0,1, 1,0,1,1,0,0,0,1,1,0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,0,1,1,1,1,1,0,0,0,0,1,0,0,1,0,0,1,1,0,0,1,1,1,1,1,1,0,0,1,1,0,0, 1,0,1,1,0,0,1,0,0,1,0,1,1,0,1,0,1,1,0,1,0,0,0,1,0,0,1,1,1,0,0,0,1,1,1,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,1,0,1,1,0,1, 0,0,0,1,1,0,1,0,0,0,1,1,0,0,1,0,0,1,1,1,0,0,1,0,0,1,1,0,0,1,0,0,0,1,1,0,1,1,1,1,1,0,0,1,1,0,0,0,0,1,0,0,0,0,0,1, 0,0,1,1,1,0,1,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,1,1,0,0,1,1,0,1,0,0,1,0,0,0,1,1,1,1,0,0,0,1,1,1,0,0,0,1,0,0,0,0,0,0,

The columns of zeros match up to give these patterns that can be verified:

30x+7 is always NOT prime every seventh x 30x+19 is always NOT prime every seventh x (offset one from x for 30x+7) 30x+17 is always NOT prime every seventh x (offset two from x for 30x+7) and continuing for other zero columns.

So I can increase the compression of this prime binary sequence further.

Here is a picture showing the pattern of zero columns that occur for

8*7 columns

Here is a picture showing there are also zero columns (narrow white vertical lines) for 8*83, so it is probable that for any 8*prime, there are zero columns that show a further pattern of spacings that are not primes.

I guess if you add up all these not prime rules you can get a formula for prime numbers :D

cheers, Jamie

• posted

Here's an image for primorial 210x (has 48 coprime formulas y=210x + b (for 48 values of b all coprimes of 210)

When the encoded binary sequence of primes is taken the rasterized to 210*11 columns, (11 is next prime greater than 210's prime factors 2*3*5*7) then a pattern of what is probably 48 vertical lines appears, one for each coprime, where the formulas 210x + coprimeOf210 are always not prime.

Here is the image of 210x encoded binary sequence of primes:

cheers, Jamie

• posted

Hi,

If you know the additional offset you can avoid the multiplication and division maybe to check if a number is prime, not sure exactly.. I never said I was good at math, just playing around, but since these easy to remove patterns appeared in the sequence I want to try to remove them all to get a more compressed sequence with no identifiable patterns that describes the primes in as compact a form as possible.

A compressed sequence with all the patterns removed is what I am aiming for..

cheers, Jamie

• posted

Hi,

What is the identity for this one that has columns of zeros for the same

30x formulas but is 8*83 bits wide in the raster? It is interesting that these zero columns seem to appear with prime multiples of 8 maybe.

cheers, Jamie

• posted

Woops forgot to link the image:

• posted

Obvious.

30x + 19 mod 7 ? 2x + 5 mod 7.

If we want the result to be divisible by 7, then

2x + 5 mod 7 ? 0 2x ? -5 mod 7 ? 2 mod 7.

Multiply by the multiplicative inverse of 2 mod 7, which is 4.

4 * 2 * x mod 7 ? 4 * 2 mod 7 8 * x mod 7 ? 8 mod 7 1 * x mod 7 ? 1 mod 7

x ? 1 mod 7.

That is, for x = 1, 8, 15, 22 ... 30x + 19 is divisible by 7, and hence not prime.

Your "discoveries" are of no importance whatsoever.

Can be proved (if it's true, I haven't checked) the same way as above.

• posted

simply multiples of 7. Sieving is a well-understood process, and there are many methods, far more sophisticated and deep, than the ones you are playing with here.

those who *do* know and are good at math?

Hi,

I appreciate your criticism but find it interesting still even if I am really learning nothing it is an adventure, there is still lots of territory to explore whether useful or not thats fine either way, but thanks for the feedback.

cheers, Jamie

No way lol :D

• posted

How can I make any of your images visible?

Gottfried

• posted

If you right click on the image and open in new tab does that work?

I generated a lot more with better file names I can email them to you if you want.

cheers, Jamie

• posted

Here is a zip file with 28 different prime binary rasters for primorials 30, 210 and 2310, labeled with filenames showing how many columns of zeros they have.

ie filename: "primorial210, 624bit wide (48x13) has a zero column pattern (13x1, 48 columns)"

is a 624 bit wide raster image (624=48x13) 48 being the number of coprimes of 210, and 13 appended primorial blocks of 48 showing the columns of zeros, one for each of the 48 coprime functions

y=210x+(coprimes of 210)

The zero columns are always symetrical too which is interesting!

cheers, Jamie

cheers, Jamie

• posted

Here is a big batch of primorial 6 raster images:

6x+1 and 6x+5 (1 and 5 coprimes of 6) make up the pixels, with 30 values of x per row of the raster for giving the most vertical zero lines (20%). The zip file has many values for x per row of the raster, but 30 is the first, least random raster, I think it has all the identities that show when 6x+1 and 6x+5 won't be prime for certain multiples of x (total of 12 cases)

Anyone can list them? :D

cheers, Jamie

• posted

Ah, thank you, that worked.

Gottfried

• posted

ing

,0,1,1,0,1,1,1,0,1,1,0,1,1,1,0,1,1,1,1,0,0,

,0,1,1,1,1,0,1,0,1,0,1,1,1,0,1,1,0,0,1,0,1,

,0,1,0,1,1,1,1,0,0,1,0,1,1,1,1,0,1,1,1,0,0,

,0,0,1,1,0,0,1,0,0,1,0,0,1,1,0,1,1,1,1,0,1,

,0,1,0,1,0,1,1,0,0,0,1,1,1,1,0,1,1,0,1,0,1,

,0,1,0,1,0,1,0,0,1,1,0,1,1,1,1,0,0,0,1,0,1,

,0,0,1,0,1,0,0,0,1,1,1,1,1,0,1,1,1,0,1,0,0,

,0,1,1,1,1,1,1,0,0,1,0,0,0,0,1,0,1,1,1,0,0,

,0,0,0,1,0,1,0,0,0,1,0,0,0,1,1,1,1,1,1,0,1,

,0,1,1,0,1,0,0,0,1,0,0,1,1,0,0,1,1,1,1,0,1,

,0,1,1,1,0,1,0,0,0,1,1,1,0,1,1,0,1,1,0,0,1,

,0,1,0,0,1,0,1,0,1,1,0,0,0,0,0,0,1,0,0,0,0,

,0,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,0,1,0,1,

,0,0,0,0,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,0,1,

,0,0,1,1,1,0,0,0,0,0,1,0,1,1,0,0,0,1,0,0,0,

,0,0,0,0,1,1,1,0,1,0,1,1,1,1,0,0,1,1,0,0,1,

,0,0,1,0,0,1,1,0,0,1,1,1,1,1,1,0,0,1,1,0,0,

,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,1,0,1,1,0,1,

,0,1,1,1,1,1,0,0,1,1,0,0,0,0,1,0,0,0,0,0,1,

,0,1,1,1,1,0,0,0,1,1,1,0,0,0,1,0,0,0,0,0,0,

+7)

nce =

+7)

All these are prime (the first col is the value of x):

7 227 21 647 28 857 42 1277 49 1487 56 1697 63 1907 98 2957 105 3167 126 3797

not real sure what you mean by offset of 2 but if it turn 227 to 229 tha= t =

is also prime

• posted

Hi,

For the offsets here is the full list:

30x+1 is always not prime every seventh x (for x starting at 3) 30x+7 is always not prime every seventh x (for x starting at 0) 30x+11 is always not prime every seventh x (for x starting at 6) 30x+13 is always not prime every seventh x (for x starting at 5) 30x+17 is always not prime every seventh x (for x starting at 2) 30x+19 is always not prime every seventh x (for x starting at 1) 30x+23 is always not prime every seventh x (for x starting at 7) 30x+29 is always not prime every seventh x (for x starting at 4)

How can I automatically find these formulas?

cheers, Jamie

• posted

I should mention the only special case is 30x+7 for x=0 is prime.

• posted

I can make tons of these that seem to be not prime all the time:

ie: by multiplying by 83*1, 83*2, 83*3, 83*4..

(30*23*83)+23 not prime: 57293 X multiplier of primorial: 83

(30*23*166)+23 not prime: 114563 X multiplier of primorial: 166

(30*23*249)+23 not prime: 171833 X multiplier of primorial: 249

(30*23*332)+23 not prime: 229103 X multiplier of primorial: 332

(30*23*415)+23 not prime: 286373 X multiplier of primorial: 415

(30*23*498)+23 not prime: 343643 X multiplier of primorial: 498

I checked these up to 3436223, which has a multipler of 4980 (83*60) all were not prime.

It's the same pattern for other zero columns in the prime binary sequences too. There are lots of these identities that produce no primes.

Here's the full list for all multiples of 83:

(I didn't include (30*1*83)+1 due to some buggy code

(30*7*83)+7 not prime: 17437 (not prime for all multiples of 83)

(30*11*83)+11 not prime: 27401 (not prime for all multiples of 83)

(30*13*83)+13 not prime: 32383 (not prime for all multiples of 83)

(30*17*83)+17 not prime: 42347 (not prime for all multiples of 83)

(30*19*83)+19 not prime: 47329 (not prime for all multiples of 83)

(30*23*83)+23 not prime: 57293 (not prime for all multiples of 83)

(30*29*83)+29 not prime: 72239 (not prime for all multiples of 83)

A pattern for each of the above is that for example the last equation: (30*29*83) is divisible by 29.

Another pattern seems to be: (primorial*prime1*prime2)+prime1 is not equal to a prime for prime1's larger than the largest prime factor in primorial, and for integer multiples of prime2.

There are cases of no primes without the above patterns, but I didn't see a pattern like that above that produces primes yet.

cheers, Jamie

• posted

Primes in Arithmetic Progressions, this quantity will be prime infinitely often. It is prime when y=0 (that is, at x=6); it is prime again at y=1 (x=13), when you get 401; is not prime at y=2 (when you get 611 = 13*47); but is prime again at y=3, when you get 821. Etc.

many values of y (but not always, since, e.g., when y = 2 you get

583=11*53).

and it will be prime infinitely often but not always.

Hi,

Thanks, here is some more data I hope it is correct now, I think I verified it better (with the computer)

(30*7*7)+7 not prime: 1477 (not prime for all multiples of 7)

ie: (30*7*14)+7 not prime: 2947

(30*7*21)+7 not prime: 4417

(30*7*28)+7 not prime: 5887

etc all not prime.

tested up to 7*714=4998 (30*7*4998)+7 not prime: 1049587

I think the general formula is:

(primorial*prime1*prime2)+prime1 is not a prime for prime1's larger than the largest prime factor in primorial, and for integer multiples of prime2, ie in the example above prime1=7 and prime2=7, and the primorial is 30, with prime factors 2,3,5.

cheers, Jamie

• posted

In general, you want the following

m * (nx + f) + k == 0 mod n

Where m corresponds to your 30, n corresponds to your "seventh" and f is your offset (i.e. starting at...). Having chosen those three numbers, you can calculate k.

Expanding

m * nx + m * f + k == 0 mod n

The first term is always 0 mod n

So m * f + k == 0 mod n

m * f == -k mod n

-m * f == k mod n

To determine k from that, take the remainder of dividing (- m * f) by n (the remainder is negative), and then add n to it.

For example, if m is 30, f is 2, and n is 7, then we get

-m * f = -60. The remainder when dividing by 7 is -4, add 7 gives 3.

So 30x + 3 is not prime for every seventh x starting at 2.

Clearly you can add any muliple of n to k. In your example, you added twice 7, giving

30x + 17 is not prime for every seventh x starting at 2. However, if the result adding a multiple of 7 to k, is a number that is not coprime with 30, then none of the results will be prime.

At least one of your examples is wrong:

If f is 6, then we get

-180 divided 7 gives remainder -5, so k is 2.

That is

30x + 2 is not prime for every seventh x starting at 6.

You said 30x + 11... starting at 6.

30 * 6 + 11 is 191, which is prime.

Sylvia.

• posted

at-least one of them is wrong.

```--
\_(?)_```
• posted

[...]

If you look at it with your eyes slightly crossed there is a 3D picture of a rabbit!

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.