OFFSET
1,1
COMMENTS
If k is the smallest integer satisfying 10^k == 1 (mod p), we say that 10 has order k (mod p). If n is the product of distinct primes p_i, the period of 1/n in base b is the least common multiple of the orders of b (mod p_i), provided b and n are relatively prime.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Primitive Root.
Wikipedia, Octal.
MATHEMATICA
q[n_] := CompositeQ[n] && SquareFreeQ[n] && AllTrue[FactorInteger[n][[;; , 1]], MultiplicativeOrder[8, #] == # - 1 &]; Select[Range[1441], q] (* Amiram Eldar, Oct 03 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Arkadiusz Wesolowski, Nov 08 2013
STATUS
approved