In number theory, a **full reptend prime** or **long prime** in base *b* is a prime number *p* such that the formula

(where *p* does not divide *b*) gives a cyclic number. Therefore the digital expansion of in base *b* repeats the digits of the corresponding cyclic number infinitely. Base 10 may be assumed if no base is specified.

The first few values of *p* for which this formula produces cyclic numbers in decimal are (sequence A001913 in OEIS)

- 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 …

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.142857142857142857142857…

Not all values of *p* will yield a cyclic number using this formula; for example *p* = 13 gives 076923076923. These failed cases will always contain a repetition of digits (possibly several).

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.”

The corresponding cyclic number to prime *p* will possess *p* – 1 digits if and only if *p* is a full reptend prime.

Advanced modular arithmetic can show that any prime of the following forms:

- 40
*k*+1 - 40
*k*+3 - 40
*k*+9 - 40
*k*+13 - 40
*k*+27 - 40
*k*+31 - 40
*k*+37 - 40
*k*+39

can *never* be a full reptend prime in base-10. The first primes of these forms, with their periods, are:

40k+1 |
40k+3 |
40k+9 |
40k+13 |
40k+27 |
40k+31 |
40k+37 |
40k+39 |
---|---|---|---|---|---|---|---|

41 period 5 |
43 period 21 |
89 period 44 |
13 period 6 |
67 period 33 |
31 period 15 |
37 period 3 |
79 period 13 |

241 period 30 |
83 period 41 |
409 period 204 |
53 period 13 |
107 period 53 |
71 period 35 |
157 period 78 |
199 period 99 |

281 period 28 |
163 period 81 |
449 period 32 |
173 period 43 |
227 period 113 |
151 period 75 |
197 period 98 |
239 period 7 |

401 period 200 |
283 period 141 |
569 period 284 |
293 period 146 |
307 period 153 |
191 period 95 |
277 period 69 |
359 period 179 |

However, studies show that *two-thirds* of primes of the form 40*k*+*n*, where *n* ≠ {1,3,9,13,27,31,37,39} 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 120*k*+23 below 100000 are full reptend primes, with 20903 being the first that is not full reptend.

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……((sequence A001122 in OEIS))

all of them are 8k+3 or 8k+5.