login
A392049
a(n) is the numerator of the harmonic mean of the digits of n.
2
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 4, 3, 8, 5, 12, 7, 16, 9, 0, 4, 2, 12, 8, 20, 3, 28, 16, 36, 0, 3, 12, 3, 24, 15, 4, 21, 48, 9, 0, 8, 8, 24, 4, 40, 24, 56, 16, 72, 0, 5, 20, 15, 40, 5, 60, 35, 80, 45, 0, 12, 3, 4, 24, 60, 6, 84, 48, 36, 0, 7, 28, 21, 56, 35, 84, 7, 112, 63
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
Cf. A011540, A371383, A392050 (denominator), A392051.
Sequence in context: A373102 A081286 A080867 * A095187 A218978 A309589
KEYWORD
nonn,base,easy,frac
AUTHOR
Stefano Spezia, Dec 29 2025
STATUS
approved