OFFSET
1,1
LINKS
Eric Weisstein's World of Mathematics, Harmonic Mean.
Wikipedia, Harmonic mean.
MATHEMATICA
Do[ h = IntegerDigits[n]; If[ Sort[h][[1]] != 0 && Length[h]/Apply[Plus, 1/h] == 3, Print[n]], {n, 1, 10^4}]
PROG
(Python)
from fractions import Fraction
def hm(n):
s = str(n)
return None if '0' in s else len(s)/sum(Fraction(1, int(d)) for d in s)
def aupto(limit): return [m for m in range(limit+1) if hm(m) == 3]
print(aupto(6332)) # Michael S. Branicky, Mar 26 2021
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Vladeta Jovovic, Jun 12 2001
EXTENSIONS
More terms from Henry Bottomley, Jul 25 2001
STATUS
approved