Tuesday 5 September 2023

Where there cannot be the maximum number of primes

In a few posts from last year, I discussed pentatrigesimal representation of numbers using all numbers and all letters except O (“O” being a common reading of the number “0” and very similar in shape).

One interesting discovery I made is that whilst 35 consecutive numbers can contain as many as ten primes, if we tabulate divisibility of numbers between each multiple of 35, we find something quite interesting:

k 6n 6n+1 6n+2 6n+3 6n+4 6n+5
1
2
2 3 2
2 2
2
2 3
3 3 2
2
2
4 2 3 2
2
5 5 2 3 2 5 2
6 2
2 3 2
7 7 2 7 2 3 2
8 2
2
2 3
9 3 2
2
2
A 2 3 2 5 2 5
B
2 3 2
2
C 2
2 3 2
D
2
2 3 2
E 2 7 2 7 2 3
F 3 2 5 2 5 2
G 2 3 2
2
H
2 3 2
2
I 2
2 3 2
J
2
2 3 2
K 2 5 2 5 2 3
L 3 2 7 2 7 2
M 2 3 2
2
N
2 3 2
2
P 2
2 3 2
Q 5 2 5 2 3 2
R 2
2
2 3
S 3 2
2
2
T 2 3 2 7 2 7
U
2 3 2
2
V 2 5 2 3 2 5
W
2
2 3 2
X 2
2
2 3
Y 3 2
2
2
Z 2 3 2
2
Possible primes 8 8 8 8 8 8

What we see is that whilst there can be ten primes in a span of thirty-five numbers, there can as shown above never be more than eight primes between consecutive multiples of 35. The first occurrence of eight primes between multiples of 35 is between the pentatrigesimal numbers 4L0 and 4LZ, or in decimal 5,635 to 5,669, whereby 5,639, 5,641, 5,647, 5,651, 5,653, 5,657, 5,659 and 5,669 are all primes.

What I found reading today is that OEIS has actually tabulated the number of possible primes between multiples of base b, as well as the number possible in an arbitrary sequence of length n. I have compared “decades” and “centuries” in all bases up to 35, with sequences serving “centuries” (k00) shaded in grey:

Base Arbitrary Multiple Difference
2 1 1 0
3 2 1 -1
2 4 2 2 0
5 2 2 0
6 2 2 0
7 3 2 -1
8 3 3 0
3 9 4 3 -1
10 4 4 0
11 4 4 0
12 4 4 0
13 5 4 -1
14 5 4 -1
15 5 4 -1
4 16 5 5 0
17 6 5 -1
18 6 6 0
19 6 6 0
20 6 6 0
21 7 5 -2
22 7 7 0
23 7 7 0
24 7 6 -1
5 25 7 7 0
26 7 7 0
27 8 7 -1
28 8 7 -1
29 8 8 0
30 8 7 -1
31 9 8 -1
32 9 9 0
33 10 8 -2
34 10 10 0
35 10 8 -2
6 36 10 10 0
7 49 13 12 -1
8 64 16 16 0
9 81 20 19 -1
10 100 23 23 0
11 121 27 26 -1
12 144 31 30 -1
13 169 37 36 -1
14 196 41 41 0
15 225 46 45 -1
17 289 58 56 -2
18 324 62 62 0
19 361 68 67 -1
20 400 75 75 0
21 441 81 80 -1
22 484 88 87 -1
23 529 95 94 -1
24 576 101 101 0
25 625 109 109 0
26 676 117 116 -1
27 729 124 124 0
28 784 132 131 -1
29 841 141 139 -2
30 900 149 149 0
31 961 158 156 -2

As you can see, the pentatrigesimal case I discovered earlier is not exceptional. For base 21, one already sees that there can never be more than five primes between multiples of 21, but there can be seven primes within arbitrary sequences of 21 numbers.

Nonetheless, the list is revealing because — as it did for me — it gave a false impression that there must be more prime-dense “decades” in pentatrigesimal than that from 4L0 to 4LZ (5,635 to 5,669 in decimal). In cases like this one does need to take some care looking for prime constellations that can actually be easily proved impossible.