OFFSET
0,3
LINKS
Eric Weisstein's World of Mathematics, Harmonic Mean.
Wikipedia, Harmonic mean.
FORMULA
a(A011540(n)) = 0.
EXAMPLE
a(43) = numerator(2*4*3/(4 + 3)) = numerator(24/7) = 24.
MATHEMATICA
a[n_]:=Numerator[HarmonicMean[IntegerDigits[n]]]; Array[a, 80, 0]
PROG
(Python)
from fractions import Fraction
def a(n):
d = list(map(int, str(n)))
return 0 if 0 in d else (len(d)/sum(Fraction(1, di) for di in d)).numerator
print([a(n) for n in range(80)]) # Michael S. Branicky, Dec 29 2025
CROSSREFS
KEYWORD
nonn,base,easy,frac
AUTHOR
Stefano Spezia, Dec 29 2025
STATUS
approved
