by Michael Thomas De Vlieger, updated 31 August 2015, St. Louis, Missouri. First published 31 August 2015.
Name | Number of full reptend primes p < n in base n. |
Data | 0, 1, 0, 2, 0, 2, 2, 1, 1, 2, 2, 3, 1, 2, 0, 5, 2, 4, 3, 2, 3, 4, 4, 1, 2, 3, 5, 5, 2, 4, 5, 6, 3, 3, 0, 6, 4, 5, 6, 6, 4, 5, 5, 4, 4, 6, 7, 1, 5, 4, 8, 7, 5, 6, 7, 7, 6, 6, 5, 10, 6, 9, 0, 8, 4, 10, 6, 8, 4, 9, 9, 11, 7, 6, 7, 7, 8, 11, 8, 1, 7, 7, 8, 9, 8, 9, 8, 12, 7, 9, 10, 8, 5, 8, 9, 10, 11, 9 |
Offset | 2, 4 |
Comments | Counts the number of primes p < n, such that the decimal expansion of 1/p has period p-1, which is the greatest period possible for any integer. |
References | G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 115. |
Links | OEIS Wiki, Full reptend primes. |
Example | a(10) = 1 since the only full reptend prime in base 10 less than 10 is 7. |
Mathematica | Count[Prime@ Range@ PrimePi@ #, n_ /; MultiplicativeOrder[#, n] == n - 1] & /@ Range[2, 99] (* Michael De Vlieger, Aug 31 2015 *) |
Crossrefs | |
Keyword | nonn |
Author | Michael De Vlieger, Aug 31 2015 |
This sequence simply counts the number of full reptend primes p in base n less than n itself. A full reptend prime is one that has a unit fraction 1/p which repeats a (p − 1) digit "mantissa" or "word" under expansion in base n. This is the maximum number of digits a prime can repeat to represent the fraction 1/p in base n.
The "fraction map" below charts the unit fractions with denominators in blue on the x-axis and bases n in red on the y-axis. The reptends of full reptend primes are shaded darker gray, except the light purple for p = 2 for odd bases n are also full reptends. The terminating "word" of regular numbers (OEIS A045763) appears in red for divisors of n, or orange for nondivisor regulars (OEIS A243822) of n. The former terminate in a single digit while the latter require more than one digit to terminate. The mixed recurrent "word" for semi-coprime numbers (OEIS A243823, i.e., those that have at least one prime factor p that divides n and one prime factor q that is coprime to n) appears in yellow. For these semi-coprime numbers of base n, the terminating "preamble" is written in bold red and the recurrent mantissa in italic overlined numerals. The purely recurrent reptend for numbers coprime to n appears in muted colors. Full reptends are dark gray while reptends with periods 2 < λ < (p − 1) appear in light gray. Reptends with period 1 pertaining to unit fractions of factors of (n − 1) appear in light blue, reptends with period 2 pertaining to unit fractions of factors of (n + 1) appear in light green. Light purple boxes indicate the full reptend associated with 2 for odd n; 2 is a full reptend prime in odd n but has a period of 1, which is maximal for p = 2.
This sequence in effect counts the dark gray and light purple boxes that appear to the left of the diagonal line of red "1"s. Odd n will have a(n) ≥ 1.