859, 881, 907, 929, 941, 953, 977, ... There are no such ps in the hexadecimal system. The known pattern to this sequence comes from algebraic number theory, specifically, this sequence is the set of primes p such that b is a primitive root modulo p. A conjecture of Emil Artin is that this sequence contains 37.395..% of the primes (for b in ). Construction of cyclic numbers Cyclic numbers can be constructed by the following procedure: Let b be the number base (10 for decimal) Let p be a prime that does not divide b. Let t = 0. Let r = 1. Let n = 0. loop: Let t = t + 1 Let x = r · b Let d = int(x / p) Let r = x mod p Let n = n · b + d If r ≠ 1 then repeat the loop. if t = p − 1 then n is a cyclic number. This procedure works by computing the digits of 1/p in base b, by long division. r is the remainder at each step, and d is the digit produced. The step n = n · b + d serves simply to collect the digits. For computers not capable of expressing very large integers, the digits may be output or collected in another way. If t ever exceeds p/2, then the number must be cyclic, without the need to compute the remaining digits. Properties of cyclic numbers When multiplied by their generating prime, the result is a sequence of b − 1 digits, where b is the base (e.g. 9 in decimal). For example, in decimal, 142857 × 7 = 999999. When split into groups of equal length (of two, three, four, etc... digits), and the groups are added, the result is a sequence of 9s. For example, 14 + 28 + 57 = 99, 142 + 857 = 999, 1428 + 5714+ 2857 = 9999, etc. ... This is a special case of Midy's Theorem. All cyclic numbers are divisible by b − 1 where b is the base (e.g. 9 in decimal) and the sum of the remainder is a multiple of the divisor. (This follows from the previous point.) Other numeric bases Using the above technique, cyclic numbers can be found in other numeric bases. (Not all of these follow the second rule (all successive multiples being cyclic