cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A375208 Modified Sisyphus function of order 5.

Original entry on oeis.org

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

Views

Author

Matt Coppenbarger, Oct 16 2024

Keywords

Comments

a(n) is the concatenation of the number of digits in n with number of digits of n congruent to k modulo 5 for each k from 0 to 4 in turn. See Example.
If we start with n and repeatedly apply the map i -> a(i), we eventually get the cycle {613200, 622110}.

Examples

			11 has two digits, both congruent to 1 modulo 5, so a(11) = 202000.
a(20) = 210100.
a(30) = 210010.
a(2527200000) = 1060400.
		

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