login
A381493
Smallest number with reciprocal of period length n in base 8.
1
1, 7, 3, 73, 5, 31, 19, 49, 17, 262657, 11, 23, 37, 79, 43, 631, 97, 103, 81, 32377, 25, 3577, 67, 47, 323, 601, 237, 2593, 29, 233, 209, 2147483647, 193, 199, 307, 71, 405, 223, 571, 937, 187, 13367, 817, 431, 115, 271, 139, 2351, 577, 343, 251
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
Sequence in context: A176328 A248279 A372617 * A379641 A183421 A173443
KEYWORD
nonn,base
AUTHOR
Erich Friedman, Feb 25 2025
STATUS
approved