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-3 of 3 results.

A001913 Full reptend primes: primes with primitive root 10.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Comments

Primes p such that the decimal expansion of 1/p has period p-1, which is the greatest period possible for any integer.
Primes p such that the corresponding entry in A002371 is p-1.
Pieter Moree writes (Oct 20 2004): Assuming the Generalized Riemann Hypothesis it can be shown that the density of primes p such that a prescribed integer g has order (p-1)/t, with t fixed exists and, moreover, it can be computed. This density will be a rational number times the so-called Artin constant. For 2 and 10 the density of primitive roots is A, the Artin constant itself.
R. K. Guy writes (Oct 20 2004): MR 2004j:11141 speaks of the unearthing by Lenstra & Stevenhagen of correspondence concerning the density of this sequence between the Lehmers & Artin.
Also called long period primes, long primes or maximal period primes.
The base-10 cyclic numbers A180340, (b^(p-1) - 1) / p, with b = 10, are obtained from the full reptend primes p. - Daniel Forgues, Dec 17 2012
The number of terms < 10^n: A086018(n). - Robert G. Wilson v, Aug 18 2014

Examples

			7 is in the sequence because 1/7 = 0.142857142857... and the period = 7-1 = 6.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 864.
  • Albert H. Beiler, Recreations in the Theory of Numbers, 2nd ed. New York: Dover, 1966, pages 65, 309.
  • John H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, p. 161.
  • C. F. Gauss, Disquisitiones Arithmeticae, Yale, 1965; see p. 380.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 115.
  • M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 61.
  • H. Rademacher and O. Toeplitz, Von Zahlen und Figuren (Springer 1930, reprinted 1968), Ch. 19, 'Die periodischen Dezimalbrüche'.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Apart from initial term, identical to A006883.
Other definitions of cyclic numbers: A003277, A001914, A180340.

Programs

  • Maple
    A001913 := proc(n) local st, period:
    st := ithprime(n):
    period := numtheory[order](10,st):
    if (st-1 = period) then
       RETURN(st):
    fi: end:  seq(A001913(n), n=1..200); # Jani Melik, Feb 25 2011
  • Mathematica
    pr=10; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == #-1 &]
    (* Second program: *)
    Join[{7},Select[Prime[Range[300]],PrimitiveRoot[#,10]==10&]] (* Harvey P. Dale, Feb 01 2018 *)
  • PARI
    forprime(p=7,1e3,if(znorder(Mod(10,p))+1==p,print1(p", "))) \\ Charles R Greathouse IV, Feb 27 2011
    
  • PARI
    is(n)=Mod(10,n)^(n\2)==-1 && isprime(n) && znorder(Mod(10,n))+1==n \\ Charles R Greathouse IV, Oct 24 2013
    
  • Python
    from itertools import count, islice
    from sympy import nextprime, n_order
    def A001913_gen(startvalue=1): # generator of terms >= startvalue
        p = max(startvalue-1,1)
        while (p:=nextprime(p)):
            if p!=2 and p!=5 and n_order(10,p)==p-1:
                yield p
    A001913_list = list(islice(A001913_gen(),20)) # Chai Wah Wu, Mar 03 2025

A097443 Half-period primes, i.e., primes p for which the decimal expansion of 1/p has period (p-1)/2.

Original entry on oeis.org

3, 13, 31, 43, 67, 71, 83, 89, 107, 151, 157, 163, 191, 197, 199, 227, 283, 293, 307, 311, 347, 359, 373, 401, 409, 431, 439, 443, 467, 479, 523, 557, 563, 569, 587, 599, 601, 631, 653, 677, 683, 719, 761, 787, 827, 839, 877, 881, 883, 911, 919, 929, 947, 991
Offset: 1

Views

Author

Julien Peter Benney (jpbenney(AT)ftml.net), Aug 23 2004

Keywords

Comments

Primes p for which 10 has multiplicative order (p-1)/2. - Robert Israel, Jul 15 2016

Examples

			13 is a half-period prime because 1/13 = 0.076923076923076923076923..., which has period 6, or (13-1)/2.
		

Crossrefs

Programs

  • Maple
    select(t -> isprime(t) and numtheory:-order(10, t) = (t-1)/2,
    [seq(t,t = 3..1000,2)]); # Robert Israel, Jul 15 2016
  • Mathematica
    f[n_Integer] := Block[{ds = Divisors[n - 1]}, (n - 1)/Take[ ds, Position[ PowerMod[ 10, ds, n], 1] [[1, 1]]] [[ -1]]]; Select[ Prime[ Range[4, 200]], f[ # ] == 2 &] (* Robert G. Wilson v, Sep 14 2004 *)
  • PARI
    is(n)= gcd(10,n)==1 && isprime(n) && znorder(Mod(10,n))==(n-1)/2 \\ Dana Jacobsen, Jul 19 2016
    
  • Perl
    use ntheory ":all"; forprimes { say if znorder(10,$) == ($-1)/2; } 1,1000; # Dana Jacobsen, Jul 19 2016

Extensions

Edited (including prepending 3), at the suggestion of Georg Fischer, by N. J. A. Sloane, Oct 19 2018

A055628 Primes p whose period of the reciprocal 1/p is (p-1)/3.

Original entry on oeis.org

103, 127, 139, 331, 349, 421, 457, 463, 607, 661, 673, 691, 739, 829, 967, 1657, 1669, 1699, 1753, 1993, 2011, 2131, 2287, 2647, 2659, 2749, 2953, 3217, 3229, 3583, 3691, 3697, 3739, 3793, 3823, 3931, 4273, 4297, 4513, 4549, 4657, 4903, 4909, 4993, 5011
Offset: 1

Views

Author

Don Willard (dwillard(AT)prairie.cc.il.us), Jun 05 2000

Keywords

Comments

Cyclic numbers of the third degree (or third order): the reciprocals of these numbers belong to one of three different cycles. Each cycle has (number-1)/3 digits.
All primes p except 2 or 5 have a reciprocal with period which divides p-1.

Examples

			127 has period 42 and (127-1)/3 = 126/3 = 42.
		

References

  • Stephen P. Richards, A Number For Your Thoughts, 1982, 1984, Box 501, New Providence, NJ, 07974, ISBN 0-9608224-0-2.

Crossrefs

Programs

  • Mathematica
    LP[ n_Integer ] := (ds = Divisors[ n - 1 ]; Take[ ds, Position[ PowerMod[ 10, ds, n ], 1 ][ [ 1, 1 ] ] ][ [ -1 ] ]); CL[ n_Integer ] := (n - 1)/LP[ n ]; Select[ Range[ 7, 7500 ], PrimeQ[ # ] && CL[ # ] == 3 & ]
    f[n_Integer] := Block[{ds = Divisors[n - 1]}, (n - 1)/Take[ ds, Position[ PowerMod[ 10, ds, n], 1] [[1, 1]]] [[ -1]]]; Select[ Prime[ Range[4, 700]], f[ # ] == 3 &] (* Robert G. Wilson v, Sep 14 2004 *)

Extensions

More terms from Robert G. Wilson v, Aug 02 2000
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 27 2007
Showing 1-3 of 3 results.