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.

A349744 a(n) is the number of distinct numbers of steps required for the last n digits of integers to repeat themselves by iterating the map m -> m^3.

Original entry on oeis.org

2, 5, 7, 12, 15, 18, 29, 42, 57, 87, 108
Offset: 1

Views

Author

Ya-Ping Lu, Nov 28 2021

Keywords

Examples

			a(1) = 2. The paths of the last digit of integers resulted from iterating the map, m -> m^3, are: 0->0; 1->1; 2->8->2; 3->7->3; 4->4; 5->5; 6->6; 7->3->7; 8->2->8; 9->9. Integers ending with 0, 1, 4, 5, 6 or 9 take 1 step to repeat the last digit. Integers ending with 2, 3, 7 or 8 takes 2 steps to repeat the last digit. Therefore, for n = 1, the distinct numbers of steps s(1) = {1, 2} and a(1) = 2.
a(2) = 5 because the distinct steps for the last two digits of integers to repeat themselves by iterating the map, m -> m^3, is s(2) = {1, 2, 3, 4, 5}.
a(3) = 7:  s(3) = s(2) + {20, 21}.
a(4) = 12: s(4) = s(3) + {6, 22, 100..102}.
a(5) = 15: s(5) = s(4) + {500..502}.
a(6) = 18: s(6) = s(5) + {2500..2502}.
a(7) = 29: s(7) = s(6) + {8..10, 40, 200, 1000, 5000, 12500..12502, 25000}
a(8) = 42: s(8) = s(7) + {16..18, 80, 400, 2000, 10000, 50000, 62500..62502, 125000, 250000}.
a(9) = 57: s(9) = s(8) + {32..34, 160, 800, 4000, 20000, 100000, 312500..312502, 500000, 625000, 1250000, 2500000}.
a(10)= 87: s(10)= s(9) + {7, 11, 19, 23, 35, 64..67, 103, 320, 503, 1600, 2503, 8000, 12503, 40000, 62503, 200000, 312503, 1000000, 1562500..1562503, 3125000, 5000000, 6250000, 12500000, 25000000}.
a(11)=108: s(11)=s(10) + {128..131, 640, 3200, 16000, 80000, 400000, 2000000, 7812500..7812503, 10000000, 15625000, 31250000, 50000000, 62500000, 125000000, 250000000}.
		

Crossrefs

Programs

  • Python
    for n in range(1, 12):
        b = 10**n; M = set()
        for i in range(b):
            t = i; L = set()
            while t not in L: L.add(t); t = (t**3)%b
            d = len(L)
            if d not in M: M.add(d)
        print(len(M), end = ', ')