Let gcd(n, m) = 1. Let r(n, m) be the set of digits in the period of 1/n base m, where no digit occurs more than once in that period. For example r(7, 10) = {1, 2, 4, 5, 7, 8} Let p(n, m) be the residues of the powers of n modulo m, for example p(2, 9) = {1, 2, 4, 5, 7, 8} When do we have p(n, m) = r(n', m'), as above?