Jumping Champions

--

In cryptography, we often end up analysing things with prime numbers. In fact one of our most popular operators is (mod p) and which is the remainder from a division by a prime number p. The prime numbers I use for testing are 97, 997, 2¹⁹-1, and 2²⁵⁵-19 (used in Curve 25519). There are also other ones such as 2⁴⁴⁸ − 2²²⁴ − 1, and which is the Goldilock prime (and used in Curve 448). Overall 2²⁵⁵-19 has 256 bits, and 2⁴⁴⁸ − 2²²⁴ − 1 has 448 bits.

Overall prime numbers have been a great fasination for research, and it was Odlyzko [here] who observed the jumping champion:

For this we have the most popular difference between a sequence of prime numbers for all the prime numbers up to x. For example, for a prime number of 13, the prime numbers are 2, 3, 5, 7, 11, and 13 and the differences will be +1, +2, +2, +4 and +2. The most popular value is thus 2 [here]:

Value:  13Primes:
[2, 3, 5, 7, 11, 13]
Occurances:
[0 1 3 0 1 0 0 0 0 0]
Jumping champions:
[2]

If we select 101, we can define that the jumping champions are 2 and 4 (as there are eight differences of 2 and 4) [here]:

Value:  101Primes:
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101]
Occurances:
[0 1 8 0 8 0 7 0 1 0]
Jumping champions:
[2 4]

A value of 467 gives champions of 2, 4 and 6 (as there are 24 occurances of these jumps) [here]:

Value:  467Primes:
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467]
Occurances:
[ 0 1 24 0 24 0 24 0 5 0]
Jumping champions:
[2 4 6]

The following outlines some sample code [here]:

from sympy import sieve
import numpy
import sys
import math
x=421
if (len(sys.argv)>1):
x=int(sys.argv[1])
if (x>1000): sys.Exit(1)primes = list(sieve.primerange(1, x+1))difference = numpy.array([0] * math.ceil(math.sqrt(x)))
for i in range(len(primes)-1):
diff = primes[i+1]-primes[i]
difference[diff] = difference[diff]+1
print ("Value: ",x)
print ("\nPrimes:")
print (primes)
print ("\nOccurances:")
print (difference[:10])
res = numpy.where(difference == numpy.amax(difference))
print ("\nJumping champions:")
for x in res:
print (x)

Odlyzko et al defined that 6 (2×3) is the sole jumping champion from 947 up to 1.7427×10³⁵, after which the sole jumping champion is 30 (2×3×5). Then around 10⁴²⁵, 210 (2×3×5×7) becomes the jumping champion. The distribution for values up to 10¹² is:

--

--

Prof Bill Buchanan OBE FRSE
ASecuritySite: When Bob Met Alice

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.