A375208 Modified Sisyphus function of order 5.
110000, 101000, 100100, 100010, 100001, 110000, 101000, 100100, 100010, 100001, 211000, 202000, 201100, 201010, 201001, 211000, 202000, 201100, 201010, 201001, 210100, 201100, 200200, 200110, 200101, 210100, 201100, 200200, 200110, 200101, 210010, 201010, 200110, 200020, 200011, 210010, 201010, 200110, 200020, 200011, 210001, 201001, 200101, 200011, 200002
Offset: 0
Examples
11 has two digits, both congruent to 1 modulo 5, so a(11) = 202000. a(20) = 210100. a(30) = 210010. a(2527200000) = 1060400.
Links
- M. E. Coppenbarger, Iterations of a modified Sisyphus function, Fib. Q., 56 (No. 2, 2018), 130-141.
Crossrefs
Programs
-
Maple
a:= n-> (l-> parse(cat(nops(l), seq(add(`if`(irem(i, 5)=k , 1, 0), i=l), k=0..4))))(convert(n, base, 10)): seq(a(n), n=0..44); # Alois P. Heinz, Oct 23 2024
-
Python
# based on Michael S. Branicky in A350709 def a(n, order=5): 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)])
-
Python
from collections import Counter def A375208(n): s = str(n) c = Counter(int(d)%5 for d in s) return int(str(len(s))+''.join(str(c[i]) for i in range(5))) # Chai Wah Wu, Nov 26 2024
Comments