Conjecture: n² divides Σ_{k=1..n} (2^k-2)/k numerator iff n is prime

rad_2007

New member
Joined
Mar 29, 2026
Messages
2
Hello everyone,

I’ve been investigating the sum:
S(n) = Σ_{k=1}^{n} (2^k - 2)/k for n > 3.

Conjecture (strong numerical evidence):

n^2 divides the numerator of S(n) ⇔ n is prime.

What’s proven / known:

- S(n) can be rewritten as:
S(n) = Σ 2^k/k - 2 Σ 1/k
- Using Wolstenholme’s theorem: for prime p>3,
H_{p-1} ≡ 0 mod p^2 ⇒ H_p ≡ 1/p mod p^2
- Partial symmetry ideas (k ↔ p-k) seem promising for the 2^k/k term, but no full proof yet.

My questions:

1. How to rigorously handle Σ 2^k/k modulo p^2 using p-adic or combinatorial methods?
2. How to prove the converse: that composites never give p^2 divisibility?

Numerical checks confirm the conjecture for many small primes and composites.

Any references, ideas, or techniques that could be applied here would be greatly appreciated!

Thank you!
 
This sounds as if you should dive deep into the theory of Mersenne numbers. If true, it also provides a primality test. However, there are already many unknown conjectures in that field. "Divides the numerator" is a bit unpleasant.
 
This sounds as if you should dive deep into the theory of Mersenne numbers. If true, it also provides a primality test. However, there are already many unknown conjectures in that field. "Divides the numerator" is a bit unpleasant.
Thanks for your valuable insights!
The conjecture I proposed is supported by extensive computation up to 10^7 with no counterexamples.
Here is the code:

from fractions import Fraction
def conjecture(n):
total = Fraction(0)
for k in range(1,n+1):
total = total + Fraction((2**k) - 2,k)
numerator = total.numerator
if numerator % (n*n) == 0:
print(f"{n} divides numerator of S(n)")
for n in range(3,10000000): conjecture(n)


While, Wolfram output says:
1774881752845.png


Your last words really make sense. That's why I should restate the the conjecture as such:
Conjecture: For all n > 3, v_p( sum_{k=1}^n (2^k - 2)/k ) >= 2 sqrt[p]{p} | n if and only if n is prime

where equivalent prime condition:

sum_{k=1}^{p-1} (2^k)/k ≡ -2 q_p(2) (mod p^2)

What do you think?
 
I'm not convinced yet how difficult it really is. I'm trying to use [math] 2^n-1=\sum_{j=0}^{n-1} 2^{j}=\sum_{k=1}^n \binom n k=\sum_{k=1}^n\dfrac{n!}{k!(n-k)!} [/math]to get a hold on the numerator alone.
 
Top