OFFSET
0,2
LINKS
Giovanni Resta, Table of n, a(n) for n = 0..40
EXAMPLE
a(4)= 77 since 77 is the smallest number that requires 4 iterations to reach a single digit: f(77)=7*7=49, f(49)=4*9=36, f(36)=3*6=18, f(18)=1*8=8.
MATHEMATICA
f[n_] := Block[{d = IntegerDigits@ n}, If[OddQ@ Length@ d, PrependTo[d, 0]]; Times @@ FromDigits /@ Transpose@ Partition[d, 2]]; a[n_] := Block[ {c=-1, m}, t=0; While[c != n, t++; m=t; c=0; While[m > 9, c++; m = f@ m]]; t]; a /@ Range[0, 12] (* Giovanni Resta, Aug 01 2018 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy and Paul D. Hanna, Sep 11 2003
EXTENSIONS
More terms from Ray Chandler, Sep 19 2003
a(30)-a(33) from Giovanni Resta, Aug 01 2018
STATUS
approved