OFFSET
0,2
COMMENTS
We consider here that 0 has no digit, and hence a(0) = 1.
The corresponding sequence for the binary base is A080100.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..9999
FORMULA
a(0) = 1.
a(10 * k + d) = a(k) * (10 - d) when 10 * k + d > 0 and 0 <= d < 10.
a(n) = Product_{ d = 0..9 } (10 - d)^A100910(n, d) for any n > 0.
EXAMPLE
a(42) = (10 - 4) * (10 - 2) = 48.
PROG
(PARI) a(n, {base=10}) = my (d=digits(n, base)); prod(i=1, #d, base-d[i])
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 18 2018
STATUS
approved