cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A386519 Index of the smallest prime p such that the number of digits L in the repeating decimal period of 1/p equals the n-th prime.

Original entry on oeis.org

5, 12, 13, 52, 2431, 16, 153888, 27417323062119920, 223378173194137397198, 452, 406, 150886, 23, 40, 2153717, 28, 92971458509, 130, 40998
Offset: 1

Views

Author

Jean-Marc Rebert, Jul 24 2025

Keywords

Comments

In general, for (q,2*5)=1, the length of the period of 1/q is equal to the multiplicative order of 10 modulo q, which is the smallest k such that 10^k == 1 (mod q). It follows that a(n) must be a prime divisor of 10^prime(n)-1. Hence, apart from a(2), we have prime(a(n)) = A147555(n) and a(20) is the index of the prime 241573142393627673576957439049. - Giovanni Resta, Jul 24 2025

Examples

			a(1) = 5, since the 5th prime, p = 11, has a repeating decimal period of length L = 2, and 2 = prime(1). There is no smaller prime for which the period length equals the 1st prime.
 n      a(n)         p  L
 1         5        11  2
 2        12        37  3
 3        13        41  5
 4        52       239  7
 5      2431     21649 11
 6        16        53 13
 7    153888   2071723 17
		

Crossrefs

Extensions

a(8)-a(19) from Giovanni Resta, Jul 24 2025