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.

Showing 1-2 of 2 results.

A072859 Primes p for which the period of 1/p is prime.

Original entry on oeis.org

11, 37, 41, 53, 79, 83, 107, 173, 227, 239, 271, 317, 347, 359, 467, 479, 563, 587, 643, 719, 733, 773, 797, 839, 907, 1031, 1187, 1231, 1283, 1307, 1319, 1439, 1493, 1523, 1627, 1637, 1879, 1907, 1987, 2027, 2039, 2467, 2477, 2677, 2791, 2837, 2879, 2963
Offset: 1

Views

Author

Benoit Cloitre, Jul 26 2002

Keywords

Comments

Primes p such that the multiplicative order of 10 (mod p) is prime. - Joerg Arndt, Oct 26 2014
Together with 3, complement in primes of A249330. - Arkadiusz Wesolowski, Oct 25 2014

Examples

			1/37 = 0. 027 027 ... with period = 3, hence 37 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[500]],PrimeQ[MultiplicativeOrder[10,#]]&] (* Ray Chandler, Oct 31 2011 *)
  • PARI
    f(n)=if(n<4,n==2,znorder(Mod(10, prime(n))));
    for(n=1,100,if(isprime(f(n))==1,print1(prime(n),", ")))

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
Showing 1-2 of 2 results.