login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A350588 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^5. 1
1, 2, 3, 4, 6, 9, 14, 23, 33, 45, 59, 75, 93, 113, 135, 159, 184, 211, 240, 271, 304, 339, 376, 415, 456, 499, 544, 591, 640, 691, 744, 799, 855, 913, 973, 1035, 1099, 1165, 1233, 1303, 1375, 1449, 1525, 1603, 1683, 1765, 1849, 1935, 2023, 2113, 2205, 2299 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
For n >= 9, a(n) = a(n-1) + 2*n - 4 - ceiling(log_2 (n)) or a(n) = n^2 - 3*n - 17 - Sum_{i=9..n} ceiling(log_2 (i)).
EXAMPLE
a(1) = 1. It takes one step to repeat the last digit by iterating the map on an integer. For example, 2^5 = 32 and 9^5 = 59049. Thus, the distinct number of steps for n = 1 is {1} and a(1) = 1.
a(2) = 2. It takes 1 or 2 steps for an integer to repeat its last two digits. For example, 24 -> 7962624; 27 -> 14348907 -> 608266787713357709119683992618861307. Thus, a(2) = 2: {1, 2}.
a(3) = 3: {1..3}.
a(4) = 4: {1..4}.
a(5) = 6: {1..6}.
a(6) = 9: {1..9}.
a(7) = 14: {1..14}.
a(8) = 23: {1..23}.
a(9) = 33: {1..24, 32..40}.
a(10) = 45: {1..25, 32..41, 64..73}.
a(11) = 59: {1..26, 32..42, 64..74, 128..138}.
PROG
(Python)
from math import log, ceil
def A350588(n):
if n <= 8:
b, S = 10**n, set()
for i in range(b):
t, s, T = i, 0, set()
while t not in T: T.add(t); t = (t**5)%b; s += 1
S.add(s)
return(len(S))
else: return n*n - 3*n - 17 - sum(ceil(log(i, 2)) for i in range(9, n+1))
CROSSREFS
Sequence in context: A256969 A005579 A000381 * A001115 A173278 A173289
KEYWORD
nonn,base
AUTHOR
Ya-Ping Lu, Jan 07 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 17:22 EDT 2024. Contains 374584 sequences. (Running on oeis4.)