OFFSET
0,2
COMMENTS
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.
REFERENCES
J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
EXAMPLE
a(3)=73 because 1/73 has period 3 in base 8 (.007007007...) and no smaller number has this property.
MATHEMATICA
a[n_] := First[Select[Divisors[8^n - 1], MultiplicativeOrder[8, #] == n &, 1]];
a[0] = 1; a[1] = 7; Table[a[n], {n, 0, 50}]
PROG
(Python)
from sympy import divisors
def A381493(n):
if n == 0: return 1
for d in divisors(8**n-1):
if d>1 and all(pow(8, k, d)!=1 for k in range(1, n)):
return d # Chai Wah Wu, Feb 28 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Erich Friedman, Feb 25 2025
STATUS
approved