A380435 Erase digit 0 from decimal expansion of n. Then repeatedly apply the number of divisor function (A000005) onto each digit until a stationary value is reached. a(n) is the final stationary value (if it is reached for all digits).
1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 11, 12, 12, 12, 12, 12, 12, 12, 12, 2, 21, 22, 22, 22, 22, 22, 22, 22, 22, 2, 21, 22, 22, 22, 22, 22, 22, 22, 22, 2, 21, 22, 22, 22, 22, 22, 22, 22, 22, 2, 21, 22, 22, 22, 22, 22, 22, 22, 22, 2, 21, 22, 22, 22, 22, 22, 22, 22, 22, 2, 21, 22, 22, 22, 22, 22
Offset: 1
Examples
For n = 21 a(21) = 21. For n = 408 we iterate 48 --> 34 --> 23 --> 22, thus, after 3 iterations, a(408) = 22.
Programs
-
Mathematica
a[n_] := FromDigits[IntegerDigits[n] /. {0 -> Nothing, ?(# > 1 &) -> 2}]; Array[a, 100] (* _Amiram Eldar, Jan 24 2025 *)
Comments