I wanted to see if the numbers preceding primes behaved differently in any way form the numbers succeeding primes so I calculated at the average number of divisors of number of the form $p-1$ and $p+1$ where $p$ is a prime.
Let $d(n)$ be the number of divisors of $n$. Define $f(x) = \sum_{p \le x} d(p-1)$ and $g(x) = \sum_{p \le x} d(p+1)$ where $p$ is a prime. I observed that there are only $3251$ instances where $f(x) < g(x)$. The largest value of $x$ for which this is true is $x = 3752789$. After checking till $x \le 1.9 \times 10^{10}$, I could not find the inequality reversing again.
This the data shows that the numbers preceding primes have on a average fewer number of divisors than the numbers succeeding primes. The graph below shows the actual data.
Question: Is there any reason why this should be true?
Source code
import numpy
p = 2
i = fd = fp = 0
d1 = d2 = p1 = p2 = 0
target = step = 10^6
while True:
i = i + 1
d1 = d1 + len(divisors(p-1))
d2 = d2 + len(divisors(p+1))
if d1 > d2:
fd = fd + 1
p1 = p1 + len(prime_factors(p-1))
p2 = p2 + len(prime_factors(p+1))
if p1 > p2:
fp = fp + 1
if i > target:
print i,p,d1,d2,fd, d2-d1,(d2-d1)/i.n(), p1,p2,fp, p2-p1
target = target + step
p = next_prime(p)