PDA

View Full Version : Strong prime pattern, how prove?


ktoz
Jun7-07, 02:47 AM
Hi

I was playing around with ways to store numbers more compactly in bases other than 2 and, just for giggles, I tried a "base" of consecutive positive integers that add up to "n". When I applied it to primes, like so

• 2 = 2
1 2 = 3
• 2 3 = 5
1 2 • 4 = 7
1 2 3 • 5 = 11
1 • 3 4 5 = 13
1 2 3 • 5 6 = 17
1 • 3 4 5 6 = 19
1 2 3 4 • 6 7 = 23
1 2 3 4 5 6 • 8 = 29
1 2 3 4 • 6 7 8 = 31
1 2 3 4 5 6 7 • 9 = 37
1 2 3 • 5 6 7 8 9 = 41
1 • 3 4 5 6 7 8 9 = 43
1 2 3 4 5 6 7 • 9 10 = 47
1 • 3 4 5 6 7 8 9 10 = 53
1 2 3 4 5 6 • 8 9 10 11 = 59
1 2 3 4 • 6 7 8 9 10 11 = 61
1 2 3 4 5 6 7 8 9 10 • 12 = 67
1 2 3 4 5 6 • 8 9 10 11 12 = 71
1 2 3 4 • 6 7 8 9 10 11 12 = 73
1 2 3 4 5 6 7 8 9 10 11 • 13 = 79
1 2 3 4 5 6 7 • 9 10 11 12 13 = 83
1 • 3 4 5 6 7 8 9 10 11 12 13 = 89
1 2 3 4 5 6 7 • 9 10 11 12 13 14 = 97
1 2 3 • 5 6 7 8 9 10 11 12 13 14 = 101
1 • 3 4 5 6 7 8 9 10 11 12 13 14 = 103
1 2 3 4 5 6 7 8 9 10 11 12 • 14 15 = 107
1 2 3 4 5 6 7 8 9 10 • 12 13 14 15 = 109
1 2 3 4 5 6 • 8 9 10 11 12 13 14 15 = 113
1 2 3 4 5 6 7 8 • 10 11 12 13 14 15 16 = 127
1 2 3 4 • 6 7 8 9 10 11 12 13 14 15 16 = 131
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 • 17 = 137
1 2 3 4 5 6 7 8 9 10 11 12 13 • 15 16 17 = 139
1 2 3 • 5 6 7 8 9 10 11 12 13 14 15 16 17 = 149
1 • 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 = 151
1 2 3 4 5 6 7 8 9 10 11 12 13 • 15 16 17 18 = 157
1 2 3 4 5 6 7 • 9 10 11 12 13 14 15 16 17 18 = 163
1 2 3 • 5 6 7 8 9 10 11 12 13 14 15 16 17 18 = 167
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 • 18 19 = 173
1 2 3 4 5 6 7 8 9 10 • 12 13 14 15 16 17 18 19 = 179
1 2 3 4 5 6 7 8 • 10 11 12 13 14 15 16 17 18 19 = 181
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 • 20 = 191
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 • 18 19 20 = 193
1 2 3 4 5 6 7 8 9 10 11 12 • 14 15 16 17 18 19 20 = 197
1 2 3 4 5 6 7 8 9 10 • 12 13 14 15 16 17 18 19 20 = 199
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 • 21 = 211
1 2 3 4 5 6 7 • 9 10 11 12 13 14 15 16 17 18 19 20 21 = 223
1 2 3 • 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 = 227
1 • 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 = 229

A potentially interesting pattern emerged. If you look down the columns, you notice that for primes greater than 7 (m = 4) there are no primes missing their 3, 6, 10, 15, 21 terms. 3, 6, 10 etc are exact sums of n(n + 1) / 2

Given:
m, n element of positive integers
p element of primes

Where:
m > 4
m > b
a = m(m+1) / 2
b = n(n + 1) / 2

Then:
a - b != p

I wrote a quick and dirty program and tested this for all primes up to p(300,000) and it seems to hold. How would I go about proving this? It's been years since I did proofs so I don't even know where to start.

Any help appreciated

P.S. is there some command that allows the display of nice neat tables within a post?

AlephZero
Jun7-07, 05:24 AM
n(n+1)/2 - k(k+1)/2 = (n+k+1)(n-k)/2

if n-k > 2 this can't be a prime number. Right now I don't feel in the mood to work the exact conditions for it to be prime when n-k=2 or n-k=1.

ktoz
Jun7-07, 07:42 AM
n(n+1)/2 - k(k+1)/2 = (n+k+1)(n-k)/2

if n-k > 2 this can't be a prime number. Right now I don't feel in the mood to work the exact conditions for it to be prime when n-k=2 or n-k=1.

Nice. Thanks!

Not sure whether this pattern offers the slightest benefit for calculating or seiving primes (p(>2) - odd integer is also never prime) but it seemed interesting that all primes between p(5) and p(300,000) contain every k where k = m(m + 1) / 2. Like there might be a prime calculating trick in there somewhere.

X=7
Jun9-07, 08:20 AM
n(n+1)/2 - k(k+1)/2 = (n+k+1)(n-k)/2

if n-k > 2 this can't be a prime number. Right now I don't feel in the mood to work the exact conditions for it to be prime when n-k=2 or n-k=1.

Nice. Thanks!

Not sure whether this pattern offers the slightest benefit for calculating or seiving primes (p(>2) - odd integer is also never prime) but it seemed interesting that all primes between p(5) and p(300,000) contain every k where k = m(m + 1) / 2. Like there might be a prime calculating trick in there somewhere.

Hi ktoz & yes nice one-liner, AlephZero. Well, with n-k=1, the expression just reduces to n, so the condition is that n itself must be prime. Similarly for n-k=2, 2n-1 must be prime.

ktoz, well spotted! I agree it's an interesting pattern, but I don't know enough to know if you're on to anything. I understood the pattern, and that all those primes seem to contain every k, where k=m(m+1)/2. However, I didn't see where your "a-b !=p" comes from - is the "!" a typo? Can you give one numeric example showing a, b, k, m, n and p.

Cheers

X=7

ktoz
Jun9-07, 12:26 PM
I understood the pattern, and that all those primes seem to contain every k, where k=m(m+1)/2. However, I didn't see where your "a-b !=p" comes from - is the "!" a typo? Can you give one numeric example showing a, b, k, m, n and p.

!= is the C expression for "not equal"

p = 71
m = ceil( (sqrt(8p + 1) - 1) / 2)
k = {1, 2, 3, ... } < ceil( (sqrt(8m + 1) - 1) / 2)

a = m(m + 1) / 2 = 78
b = k(k + 1) / 2 = {1, 3, 6, 10, ...}

a - b = 72 != p(n)

X=7
Jun10-07, 10:25 AM
!= is the C expression for "not equal"

p = 71
m = ceil( (sqrt(8p + 1) - 1) / 2)
k = {1, 2, 3, ... } < ceil( (sqrt(8m + 1) - 1) / 2)

a = m(m + 1) / 2 = 78
b = k(k + 1) / 2 = {1, 3, 6, 10, ...}

a - b = 72 != p(n)
Thanks ktoz - I get it now. Heh, I'm not a programmer & got my maths degree more than 20 years ago so rather rusty! AlephZero's rearrangement shows the condition for the difference to be prime is that n or 2n-1 would have to be prime. Having a look at the first "easier" case, n prime, would be the way I would try to go.

Good luck.

X=7