A381493 Smallest number with reciprocal of period length n in base 8.
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
Examples
a(3)=73 because 1/73 has period 3 in base 8 (.007007007...) and no smaller number has this property.
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.
Programs
-
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}]
-
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
Comments