login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A096972
Number of preimages of n (or immediate predecessors) under map f(k) = k + (product of nonzero digits of k).
3
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 2, 0, 2, 0, 2, 0, 2, 0, 1, 0, 2, 1, 1, 0, 2, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 2, 0, 0, 1, 1, 0, 2, 1, 1, 1, 0, 0, 2, 0, 0, 0, 1, 2, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 2, 1, 1, 0, 1, 0, 0, 0, 2, 1, 0, 1, 1, 0, 2, 1, 0, 0, 0, 1, 2, 0, 2, 1, 0, 0, 1, 0, 1, 1, 0, 0, 2, 1, 1, 1, 3, 0, 2, 0
OFFSET
1,12
MATHEMATICA
f[n_] := Block[{s = Sort[ IntegerDigits[ n]]}, While[ s[[1]] == 0, s = Drop[s, 1]]; n + Times @@ s]; t = Table[0, {111}]; Do[ t[[f [n]]]++, {n, 111}]; Table[ t[[n]], {n, 105}]
KEYWORD
easy,nonn,base
AUTHOR
Robert G. Wilson v, Jul 16 2004
STATUS
approved