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 A381493 #15 Feb 28 2025 15:13:53 %S A381493 1,7,3,73,5,31,19,49,17,262657,11,23,37,79,43,631,97,103,81,32377,25, %T A381493 3577,67,47,323,601,237,2593,29,233,209,2147483647,193,199,307,71,405, %U A381493 223,571,937,187,13367,817,431,115,271,139,2351,577,343,251 %N A381493 Smallest number with reciprocal of period length n in base 8. %C A381493 For n > 1, a(n) is the smallest positive d such that d divides 8^n - 1 and does not divide any of 8^k - 1 for 0 < k < n. %D A381493 J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements. %e A381493 a(3)=73 because 1/73 has period 3 in base 8 (.007007007...) and no smaller number has this property. %t A381493 a[n_] := First[Select[Divisors[8^n - 1], MultiplicativeOrder[8, #] == n &, 1]]; %t A381493 a[0] = 1; a[1] = 7; Table[a[n], {n, 0, 50}] %o A381493 (Python) %o A381493 from sympy import divisors %o A381493 def A381493(n): %o A381493 if n == 0: return 1 %o A381493 for d in divisors(8**n-1): %o A381493 if d>1 and all(pow(8,k,d)!=1 for k in range(1,n)): %o A381493 return d # _Chai Wah Wu_, Feb 28 2025 %Y A381493 Cf. A003060, A379641. %K A381493 nonn,base %O A381493 0,2 %A A381493 _Erich Friedman_, Feb 25 2025