%I #26 May 13 2022 10:12:10
%S 1100,1010,1001,1100,1010,1001,1100,1010,1001,1100,2110,2020,2011,
%T 2110,2020,2011,2110,2020,2011,2110,2101,2011,2002,2101,2011,2002,
%U 2101,2011,2002,2101,2200,2110,2101,2200,2110,2101,2200
%N Modified Sisyphus function of order 3: a(n) is the concatenation of (number of digits of n)(number digits of n congruent to 0 modulo 3)(number of digits of n congruent to 1 modulo 3)(number of digits of n congruent to 2 modulo 3).
%C If we start with n and repeatedly apply the map i -> a(i), we eventually get the cycle {4031, 4112, 4220}
%D M. E. Coppenbarger, Iterations of a modified Sisyphus function, Fib. Q., 56 (No. 2, 2018), 130-141.
%e 11 has two digits, both congruent to 1 modulo 3, so a(11) = 2020.
%e a(20) = 2101.
%e a(30) = 2200.
%e a(1111123567) = 10262.
%o (Python)
%o def a(n):
%o d, m = list(map(int, str(n))), [0, 0, 0]
%o for di in d: m[di%3] += 1
%o return int(str(len(d)) + "".join(map(str, m)))
%o print([a(n) for n in range(37)]) # _Michael S. Branicky_, Mar 28 2022
%Y Cf. A073053 (Sisyphus), A171797, A171798, A171813, A055642, A196563, A196564, A308002.
%K nonn,base,easy
%O 0,1
%A _Matthew E. Coppenbarger_, Mar 28 2022