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.

User: Matt Coppenbarger

Matt Coppenbarger's wiki page.

Matt Coppenbarger has authored 2 sequences.

A383931 Minimal nonnegative integer which reaches a cycle after exactly n iterations of the modified Sisyphus function of order 5 (A375208).

Original entry on oeis.org

613200, 100123, 100012, 10, 1023, 100, 0, 10234, 10000123, 10000000000002
Offset: 0

Author

Matt Coppenbarger, May 15 2025

Keywords

Comments

The sole cycle is C = {613200,622110} and iteration stops on reaching either element of this cycle.
The next term is 145 digits a(10) = decimal 1 0^(101) 1^(10) 2^(11) 3^(11) 4^(11) where ^ denotes repetition of a digit.

Examples

			For n=6, a(6) = 0 takes 6 iterations to reach C: 0 -> 110000 -> 642000 -> 631101 -> 614010 -> 632001 -> 6221100.
		

References

  • J. Schram, The Sisyphus string, J. Recreational Math., 19 (1987), 43-44.

Crossrefs

Cf. A375208 (Sisyphus 5 function).

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

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