A062180 Harmonic mean of digits is 2.
2, 22, 136, 144, 163, 222, 316, 361, 414, 441, 613, 631, 1236, 1244, 1263, 1326, 1333, 1362, 1424, 1442, 1623, 1632, 2136, 2144, 2163, 2222, 2316, 2361, 2414, 2441, 2613, 2631, 3126, 3133, 3162, 3216, 3261, 3313, 3331, 3612, 3621, 4124, 4142, 4214, 4241
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
h:= proc(L) local m,x,i,t; m:= nops(L)+1; x:= m/2 - add(1/t, t=L); if x > 0 then x:= 1/x; if x::posint and x <= 9 then return(x + add(L[i]*10^i,i=1..m-1)) fi fi end proc: f:= n -> h(map(`+`,convert(n,base,9),1)): g:= n -> h([op(map(`+`,convert(n,base,9),1)),1]): R:= 2: for d from 1 to 4 do R:= R, seq(f(i),i=9^(d-1)..9^d-1),seq(g(i),i=9^(d-1)..9^d-1) od: R; # Robert Israel, Apr 05 2021
-
Mathematica
Do[ h = IntegerDigits[n]; If[ Sort[h][[1]] != 0 && Length[h]/Apply[Plus, 1/h] == 2, Print[n]], {n, 1, 10^4}]
Extensions
More terms from Henry Bottomley, Jul 25 2001