In number theory, a full reptend prime, full repetend prime, proper prime or long prime in base b is a prime number p such that the formula
Contents
- Patterns of occurrence of full reptend primes
- Binary full reptend primes
- n th level reptend prime
- Full reptend primes in various bases
- References
(where p does not divide b) gives a cyclic number. Therefore the digital expansion of
Base 10 may be assumed if no base is specified, in which case the expansion of the number is called a repeating decimal. In base 10, if a full reptend prime ends in the digit 1, then each digit 0, 1, ..., 9 appears in the repetend the same number of times as each other digit. (For such primes in base 10, see A073761. In fact, in base n, if a full reptend prime ends in the digit 1, then each digit 0, 1, ..., n−1 appears in the repetend the same number of times as each other digit, but no such prime exists when n = 12, since every full reptend prime in base 12 ends in the digit 5 or 7 in the same base. Generally, no such prime exists when n is congruent to 0 or 1 mod 4)
The values of p less than 1000 for which this formula produces cyclic numbers in decimal are:
7, 17, 19, 23, 29, 47, 59, 61, 97, 109, 113, 131, 149, 167, 179, 181, 193, 223, 229, 233, 257, 263, 269, 313, 337, 367, 379, 383, 389, 419, 433, 461, 487, 491, 499, 503, 509, 541, 571, 577, 593, 619, 647, 659, 701, 709, 727, 743, 811, 821, 823, 857, 863, 887, 937, 941, 953, 971, 977, 983, ... (sequence A001913 in the OEIS)For example, the case b = 10, p = 7 gives the cyclic number 142857; thus 7 is a full reptend prime. Furthermore, 1 divided by 7 written out in base 10 is 0.142857 142857 142857 142857...
Not all values of p will yield a cyclic number using this formula; for example p = 13 gives 076923 076923. These failed cases will always contain a repetition of digits (possibly several) over the course of p − 1 digits.
The known pattern to this sequence comes from algebraic number theory, specifically, this sequence is the set of primes p such that 10 is a primitive root modulo p. Artin's conjecture on primitive roots is that this sequence contains 37.395..% of the primes.
The term "long prime" was used by John Conway and Richard Guy in their Book of Numbers. Confusingly, Sloane's OEIS refers to these primes as "cyclic numbers."
Patterns of occurrence of full reptend primes
Advanced modular arithmetic can show that any prime of the following forms:
can never be a full reptend prime in base 10. The first primes of these forms, with their periods, are:
However, studies show that two-thirds of primes of the form 40k+n, where n ∈ {7, 11, 17, 19, 21, 23, 29, 33} are full reptend primes. For some sequences, the preponderance of full reptend primes is much greater. For instance, 285 of the 295 primes of form 120k+23 below 100000 are full reptend primes, with 20903 being the first that is not full reptend.
Binary full reptend primes
In base 2, the full reptend primes are: (less than 1000)
3, 5, 11, 13, 19, 29, 37, 53, 59, 61, 67, 83, 101, 107, 131, 139, 149, 163, 173, 179, 181, 197, 211, 227, 269, 293, 317, 347, 349, 373, 379, 389, 419, 421, 443, 461, 467, 491, 509, 523, 541, 547, 557, 563, 587, 613, 619, 653, 659, 661, 677, 701, 709, 757, 773, 787, 797, 821, 827, 829, 853, 859, 877, 883, 907, 941, 947, ... (sequence A001122 in the OEIS)For these primes, 2 is a primitive root modulo p, so 2n modulo p can be any natural number between 1 and p − 1.
These sequences of period p − 1 have an autocorrelation function that has a negative peak of −1 for shift of
All of them are of form 8k + 3 or 8k + 5, because if p = 8k + 1 or 8k + 7, then 2 is a quadratic residue modulo p, so p divides
Further, all safe primes congruent to 3 (mod 8) are full reptend primes in base 2. For example, 3, 11, 59, 83, 107, 179, 227, 347, 467, 563, 587, 1019, 1187, 1283, 1307, 1523, 1619, 1907, etc. (less than 2000)
Binary full reptend prime sequences (also called maximum-length decimal sequences) have found cryptographic and error-correction coding applications. In these applications, repeating decimals to base 2 are generally used which gives rise to binary sequences. The maximum length binary sequence for
The following is a list about the periods (in binary) to the primes congruent to 1 or 7 (mod 8): (less than 1000)
None of them are binary full reptend primes.
The binary period of nth prime are
2, 4, 3, 10, 12, 8, 18, 11, 28, 5, 36, 20, 14, 23, 52, 58, 60, 66, 35, 9, 39, 82, 11, 48, 100, 51, 106, 36, 28, 7, 130, 68, 138, 148, 15, 52, 162, 83, 172, 178, 180, 95, 96, 196, 99, 210, 37, 226, 76, 29, 119, 24, 50, 16, 131, 268, 135, 92, 70, 94, 292, 102, 155, 156, 316, 30, 21, 346, 348, 88, 179, 183, 372, 378, 191, 388, 44, ... (this sequence starts at n = 2, or the prime = 3) (sequence A014664 in the OEIS)The binary period level of nth prime are
1, 1, 2, 1, 1, 2, 1, 2, 1, 6, 1, 2, 3, 2, 1, 1, 1, 1, 2, 8, 2, 1, 8, 2, 1, 2, 1, 3, 4, 18, 1, 2, 1, 1, 10, 3, 1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 6, 1, 3, 8, 2, 10, 5, 16, 2, 1, 2, 3, 4, 3, 1, 3, 2, 2, 1, 11, 16, 1, 1, 4, 2, 2, 1, 1, 2, 1, 9, 2, 2, 1, 1, 10, 6, 6, 1, 2, 6, 1, 2, 1, 2, 2, 1, 3, 2, 1, 2, 1, 1, ... (sequence A001917 in the OEIS)However, studies show that three-fourths of primes of the form 8k+n, where n ∈ {3, 5} are full reptend primes in base 2 (For example, there are 87 primes below 1000 congruent to 3 or 5 (mod 8), and 67 of them are full-reptend in base 2, it is total 77%). For some sequences, the preponderance of full reptend primes is much greater. For instance, 1078 of the 1206 primes of form 24k+5 below 100000 are full reptend primes in base 2, with 1013 being the first that is not full reptend in base 2.
n-th level reptend prime
An n-th level reptend prime is a prime p having n different cycles in expansions of
In base 2, smallest n-th level reptend prime are
3, 7, 43, 113, 251, 31, 1163, 73, 397, 151, 331, 1753, 4421, 631, 3061, 257, 1429, 127, 6043, 3121, 29611, 1321, 18539, 601, 15451, 14327, 2971, 2857, 72269, 3391, 683, 2593, 17029, 2687, 42701, 11161, 13099, 1103, 71293, 13121, 17467, 2143, 83077, 25609, 5581, 5153, 26227, 2113, 51941, 2351, ... (sequence A101208 in the OEIS)Full reptend primes in various bases
Artin also conjectured:
The smallest full-reptend primes in base n are:
2, 3, 2, 0, 2, 11, 2, 3, 2, 7, 2, 5, 2, 3, 2, 0, 2, 5, 2, 3, 2, 5, 2, 7, 2, 3, 2, 5, 2, 11, 2, 3, 2, 19, 2, 0, 2, 3, 2, 7, 2, 5, 2, 3, 2, 11, 2, 5, 2, 3, 2, 5, 2, 7, 2, 3, 2, 5, 2, 19, 2, 3, 2, 0, 2, 7, 2, 3, 2, 19, 2, 5, 2, 3, 2, 13, 2, 5, 2, 3, 2, 5, 2, 11, 2, 3, 2, 5, 2, 11, 2, 3, 2, 7, 2, 7, 2, 3, 2, 0, ... (sequence A056619 in the OEIS)