An interesting Pattern in Prime Number Gaps

Joined
Nov 8, 2024
Messages
1
Reaction score
0
The sum of integers within each gap is divisible by the number of integers in the gap, with specific exceptions. For gaps that contain 1 integer, the integer is divisible by 6..
I tested to 15485863 (millionth prime) and the pattern holds.

I found that curious.. like scaling intervals..
Appreciate any insight...
 
Let a,b represent two integers such that a < b.
Consider these two sets
P = {1,2,3,...,a-1}
Q = {1,2,3,...,b}
To sum a string of consecutive integers from 1 to n, we use the formula 0.5n*(n+1).
Sum(P) = 0.5*(a-1)*(a-1+1) = 0.5a*(a-1)
Sum(Q) = 0.5b*(b+1)
R = Sum(Q) - Sum(P)
R = 0.5b*(b+1) - 0.5a*(a-1)
R = 0.5*(b^2+b-a^2+a)
R = 0.5*( (b^2-a^2)+(b+a) )
R = 0.5*( (b+a)(b-a)+(b+a) )
R = 0.5*(b+a)*(b-a+1)
The value of R represents the sum of the consecutive integers {a,a+1,a+2,...,b-1,b}
Notice that b-a+1 is a factor of R, and also b-a+1 represents the number of items in that set.


For example, lets try a = 7 and b = 23.
P = {1,2,3,...,a-1} = {1,2,3,...,6}
Q = {1,2,3,...,b} = {1,2,3,...,23}
Sum(P) = 1+2+...+6 = 0.5*6*(6+1) = 21
Sum(Q) = 1+2+...+23 = 0.5*23*(23+1) = 276
R = Sum(Q) - Sum(P) = 276-21 = 255
We have shown that 7+8+9+...+23 = 255 and we can also say that there are b-a+1 = 23-7+1 = 17 items in the set {7,8,9,...,22,23}. Furthermore, 17 is a factor of 255.
255 = 15*17


Notice that I haven't mentioned primes. It turns out that this trick works between any two integers. They don't have to be primes.
If you plug in something like a = 12 and b = 18 then you should find that sum(Q) - sum(P) = 0.5*18*(18+1) - 0.5*11*(11+1) = 171 - 66 = 105
As a check,
12+13+14+15+16+17+18 = 105
There are b-a+1 = 18-12+1 = 7 items in the set {12,13,...,18} and 7 is a factor of 105
15 = 7*15


So your initial statement can be expanded to "The sum of any string of consecutive integers is a multiple of the number of integers being added". There is perhaps a more efficient way to word this.
 

Members online

No members online now.

Forum statistics

Threads
2,555
Messages
9,909
Members
706
Latest member
irlenBingus
Back
Top