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.
%I A365933 #74 Jan 23 2024 13:25:27 %S A365933 1,9,27,9,9,27,54,9,81,9,18,27,54,54,27,9,144,81,162,9,54,18,198,27,9, %T A365933 54,243,54,252,27,135,9,54,144,54,81,27,162,54,9,45,54,189,18,81,198, %U A365933 414,27,378,9,432,54,117,243,18,54,162,252,522,27,540,135,162,9,54 %N A365933 a(n) is the period of the remainders when repdigits are divided by n. %C A365933 For n>1: Periods are divisible by 9 (= a full cycle in the sequence of repdigits). a(n)/9 is the period of the remainders when repunits are divided by n. So the digit part of the repdigits has no effect on periods generally. For most n the beginning of the periodic part is always A010785(1). If n is a term of A083118 the periodic part starts later after some initial remainders that do not repeat. %H A365933 Karl-Heinz Hofmann, <a href="/A365933/a365933_3.txt">Table with additional information</a>. %e A365933 For n = 6: Remainders of A010785(1..54) mod n. %e A365933 A010785( 1...9) mod n: [1, 2, 3, 4, 5, 0, 1, 2, 3] %e A365933 A010785(10..18) mod n: [5, 4, 3, 2, 1, 0, 5, 4, 3] %e A365933 A010785(19..27) mod n: [3, 0, 3, 0, 3, 0, 3, 0, 3] %e A365933 So the period is 3*9 = 27. Thus a(n) = 27. And the pattern seen above starts again: %e A365933 A010785(28..36) mod n: [1, 2, 3, 4, 5, 0, 1, 2, 3] %e A365933 A010785(37..45) mod n: [5, 4, 3, 2, 1, 0, 5, 4, 3] %e A365933 A010785(46..54) mod n: [3, 0, 3, 0, 3, 0, 3, 0, 3] %o A365933 (Python) %o A365933 def A365933(n): %o A365933 if n == 1: return 1 %o A365933 remainders, exponent = [], 1 %o A365933 while (rem:=(10**exponent // 9 % n)) not in remainders: %o A365933 remainders.append(rem); exponent += 1 %o A365933 return (exponent - remainders.index(rem) - 1) * 9 %o A365933 (Python) %o A365933 def A365933(n): %o A365933 if n==1: return 1 %o A365933 a,b,x,y=1,1,1%n,11%n %o A365933 while x!=y: %o A365933 if a==b: %o A365933 a<<=1 %o A365933 x,b=y,0 %o A365933 y = (10*y+1)%n %o A365933 b+=1 %o A365933 return 9*b # _Chai Wah Wu_, Jan 23 2024 %Y A365933 Cf. A010785, A002275. %Y A365933 Cf. A305322 (divisor 3), A002279 (divisor 5), A366596 (divisor 7). %Y A365933 Cf. A083118 (the impossible divisors). %K A365933 nonn,base %O A365933 1,2 %A A365933 _Karl-Heinz Hofmann_, Nov 07 2023