login
A070560
a(0) = 1; for n > 0, a(n) = (fecundity of n) + 2.
2
1, 12, 11, 11, 10, 3, 10, 9, 9, 8, 2, 10, 9, 9, 8, 3, 8, 8, 7, 5, 2, 7, 7, 6, 7, 4, 6, 7, 4, 5, 2, 5, 6, 4, 4, 3, 5, 5, 5, 4, 2, 6, 3, 4, 3, 5, 3, 4, 3, 6, 2, 7, 5, 10, 4, 3, 6, 4, 4, 3, 2, 4, 4, 7, 7, 4, 3, 3, 9, 7, 2, 6, 6, 4, 3, 3, 8, 7, 5, 4, 2, 6, 4, 3, 9, 5, 5, 5, 6, 5, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2
OFFSET
0,2
COMMENTS
Start with n, repeatedly replace x by x + product of digits of x until reach 0; fecundity = number of steps - 1.
EXAMPLE
1 -> 2 -> 4 -> 8 -> 16 -> 22 -> 26 -> 38 -> 62 -> 74 -> 102 -> 0 has fecundity 10.
MATHEMATICA
f[n_] := Length@ FixedPointList[ # + Times @@ IntegerDigits@# &, n]; f[0] = 1; Array[f, 105, 0] (* Robert G. Wilson v, Jun 27 2010 *)
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
N. J. A. Sloane, May 07 2002
EXTENSIONS
More terms from Robert G. Wilson v, Jun 27 2010
STATUS
approved