OFFSET
0,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
MATHEMATICA
dsr[n_] := Denominator[Total[1/Select[IntegerDigits[n], # > 0 &]]]; dsr /@ Range[0, 76] (* Jayanta Basu, Jul 13 2013 *)
PROG
(Haskell)
import Data.Ratio ((%), denominator)
a214950 = f 0 where
f y 0 = denominator y
f y x = f (y + if d == 0 then 0 else 1 % d) x'
where (x', d) = divMod x 10
(PARI) a(n) = my(d=digits(n)); denominator(sum(k=1, #d, if (d[k], 1/d[k]))); \\ Michel Marcus, Jan 26 2022
CROSSREFS
KEYWORD
nonn,base,frac
AUTHOR
Reinhard Zumkeller, Aug 02 2012
STATUS
approved