# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a349744 Showing 1-1 of 1 %I A349744 #8 Mar 11 2023 07:55:16 %S A349744 2,5,7,12,15,18,29,42,57,87,108 %N 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. %e A349744 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. %e A349744 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}. %e A349744 a(3) = 7: s(3) = s(2) + {20, 21}. %e A349744 a(4) = 12: s(4) = s(3) + {6, 22, 100..102}. %e A349744 a(5) = 15: s(5) = s(4) + {500..502}. %e A349744 a(6) = 18: s(6) = s(5) + {2500..2502}. %e A349744 a(7) = 29: s(7) = s(6) + {8..10, 40, 200, 1000, 5000, 12500..12502, 25000} %e A349744 a(8) = 42: s(8) = s(7) + {16..18, 80, 400, 2000, 10000, 50000, 62500..62502, 125000, 250000}. %e A349744 a(9) = 57: s(9) = s(8) + {32..34, 160, 800, 4000, 20000, 100000, 312500..312502, 500000, 625000, 1250000, 2500000}. %e A349744 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}. %e A349744 a(11)=108: s(11)=s(10) + {128..131, 640, 3200, 16000, 80000, 400000, 2000000, 7812500..7812503, 10000000, 15625000, 31250000, 50000000, 62500000, 125000000, 250000000}. %o A349744 (Python) %o A349744 for n in range(1, 12): %o A349744 b = 10**n; M = set() %o A349744 for i in range(b): %o A349744 t = i; L = set() %o A349744 while t not in L: L.add(t); t = (t**3)%b %o A349744 d = len(L) %o A349744 if d not in M: M.add(d) %o A349744 print(len(M), end = ', ') %Y A349744 Cf. A000578, A348338, A348339. %K A349744 nonn,base,more %O A349744 1,1 %A A349744 _Ya-Ping Lu_, Nov 28 2021 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE