OFFSET
0,1
COMMENTS
If we start with n and repeatedly apply the map i -> a(i), we eventually get one of three cycles: {51220}, {50410, 52111, 53200}, or {51301}
REFERENCES
M. E. Coppenbarger, Iterations of a modified Sisyphus function, Fib. Q., 56 (No. 2, 2018), 130-141.
EXAMPLE
11 has two digits, both congruent to 1 modulo 4, so a(11) = 20200.
a(20) = 21010.
a(30) = 21001.
a(1111123567) = 100622.
PROG
(Python)
def a(n, order=4):
d, m = list(map(int, str(n))), [0]*order
for di in d: m[di%order] += 1
return int(str(len(d)) + "".join(map(str, m)))
print([a(n) for n in range(37)]) # Michael S. Branicky, Apr 01 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Matthew E. Coppenbarger, Apr 01 2022
STATUS
approved