login
A389596
Harmonic-mean index of primes: a(1) = 0 and thereafter a(n) = floor( n / (2*H(n)) ), where H(n) = Sum_{k=1..n} 1/prime(k).
1
0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18
OFFSET
1,6
COMMENTS
For n >= 2, f(n) = n/(2*H(n)) is strictly increasing and never an integer, hence a(n) is nondecreasing with unit jumps. Indeed, f(n+1) - f(n) = (p*H(n) - n) / (2*H(n)*(p*H(n) + 1)), where p = prime(n+1), so 0 < f(n+1) - f(n) < 1/(2*H(n)) < 1 (since H(2) = 5/6 > 1/2 and H is increasing).
Let P_n = A002110(n) (primorial) and S_n = Sum_{k=1..n} P_n/p_k = A024451(n). Then gcd(S_n, P_n) = 1 and S_n is odd. Consequently f(n) = n*P_n/(2*S_n) can be an integer only at n = 1; therefore the only tie case is n = 1, giving a(1) = 0, and for n >= 2 we may simply use floor.
Define t(m) = min{ n : a(n) = m } and L(m) = t(m+1) - t(m). Since f is strictly increasing and non-integral (n >= 2), t(m) = min{ n : f(n) >= m }. Asymptotically L(m) = 2*log log m + O(1) = Theta(log log m). From Rosser-Schoenfeld bounds one obtains effective constants c1, c2 and m0 with c1 + 2*log log m <= L(m) <= c2 + 2*log log m for all m >= m0 (e.g., a conservative choice c1 = -10, c2 = +10, m0 = 16).
a(n) = n / (2*(log log n + B1)) + O( n/(log n*log log n) ), using prime(n) ~ n*(log n + log log n - 1 + ...) and H(n) = log log n + B1 + (log log n - 1)/log n + O( (log log n)^2/(log n)^2 ), where B1 = A077761.
t(m) ~ 2*m*(log log m + B1), and L(m) ~ 2*log log m + O(1).
REFERENCES
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 6th ed., Oxford Univ. Press, 2008, Chap. XXII; see Sec. 22.18 "Products of k prime factors", pp. 383-386 (6th ed. pagination).
LINKS
J. Barkley Rosser and Lowell Schoenfeld, Approximate formulas for some functions of prime numbers, Illinois J. Math. 6 (1962), 64-94.
FORMULA
a(n) = floor( n*A002110(n) / (2*A024451(n)) ), for n >= 2.
EXAMPLE
n=1: primes {2}, H(1) = 1/2, f(1) = 1, a(1) = 0.
n=5: primes {2,3,5,7,11}, H(5) = 2927/2310, f(5) = 5775/2927 = 1.973..., a(5) = 1.
MATHEMATICA
primorial[n_] := Product[Prime[i], {i, n}];
a024451[n_] := Numerator @ Sum[1/Prime[i], {i, n}];
a[n_]:=Floor[n*primorial[n]/(2*a024451[n])]; a[1]=0; Array[a, 75] (* James C. McMahon, Nov 13 2025 *)
PROG
(Python)
from sympy import prime
def a_values(N: int):
if N < 1:
return []
P = 2
S = 1
out = [0]
if N == 1:
return out
for n in range(2, N + 1):
p = prime(n)
P_prev = P
P *= p
S = p*S + P_prev
out.append((n*P) // (2*S))
return out
(Python)
from fractions import Fraction
from sympy import prime
def A389596(n):
if n == 1: return 0
return n*(h:=sum(Fraction(1, prime(k)) for k in range(1, n+1))).denominator//(h.numerator<<1) # Chai Wah Wu, Nov 13 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Pablo Cadena-Urzúa, Oct 10 2025
STATUS
approved