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.

Previous Showing 11-20 of 62 results. Next

A061323 Primes with 10 as smallest positive primitive root.

Original entry on oeis.org

313, 337, 1021, 1297, 1783, 1873, 2137, 2971, 3221, 3313, 4051, 4339, 5233, 5531, 5743, 6073, 6301, 6337, 6553, 6793, 7177, 7753, 8233, 9109, 9697, 9829, 9931, 10273, 10781, 11059, 11149, 11257, 11617, 11941, 11971, 12143, 12457, 12577
Offset: 1

Views

Author

Klaus Brockhaus, Apr 24 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Prime[ Select[ Range[2000], PrimitiveRoot[ Prime[ # ] ] == 10 & ] ]
    Select[ Prime@Range@1510, PrimitiveRoot@# == 10 &] (* Robert G. Wilson v, May 11 2001 *)
  • PARI
    is(n)=n>9 && isprime(n) && znorder(Mod(2,n))Charles R Greathouse IV, Apr 24 2015

A007138 Smallest primitive factor of 10^n - 1. Also smallest prime p such that 1/p has repeating decimal expansion of period n.

Original entry on oeis.org

3, 11, 37, 101, 41, 7, 239, 73, 333667, 9091, 21649, 9901, 53, 909091, 31, 17, 2071723, 19, 1111111111111111111, 3541, 43, 23, 11111111111111111111111, 99990001, 21401, 859, 757, 29, 3191, 211, 2791, 353, 67, 103, 71, 999999000001, 2028119, 909090909090909091
Offset: 1

Views

Author

Keywords

Comments

In the 18th century, the Japanese mathematician Ajima Naonobu (a.k.a. Ajima Chokuyen) gave the first 16 terms (Smith and Mikami, p. 199). - Jonathan Sondow, May 25 2013
Also the least prime number p such that the multiplicative order of 10 modulo p is n. - Robert G. Wilson v, Dec 09 2013
n always divides p-1. - Jon Perry, Nov 02 2014

Examples

			a(3) = 37 since 1/37 = 0.027027... has period 3, and 37 is the smallest such prime (in fact, the only one).
		

References

  • Ajima Naonobu (aka Ajima Chokuyen), Fujin Isshũ (Periods of Decimal Fractions).
  • J. Brillhart et al., Factorizations of b^n +/- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

First column of A046107.
Cf. A001913.
Cf. A112927 (base 2), A143663 (base 3), A112092 (base 4), A143665 (base 5), A379639 (base 6), A379640 (base 7), A379641 (base 8), A379642 (base 9), A007138 (base 10), A379644 (base 11), A252170 (base 12).

Programs

  • Maple
    S:= {}:
    for n from 1 to 60 do
      F:= numtheory:-factorset(10^n-1) minus S;
      A[n]:= min(F);
      S:= S union F;
    od:
    seq(A[n],n=1..60); # Robert Israel, Nov 10 2014
  • Mathematica
    s={}; Reap[Scan[(x=Complement[FactorInteger[10^#-1][[All,1]],s]; Sow[Min[x]]; s=Union[s,x])&,Range@60]][[2,1]] (* Shenghui Yang, Apr 15 2025 *)

Extensions

b-file truncated to 364 terms as a(365) was wrong and is currently unknown (pointed by Eric Chen), and a-file revised by Max Alekseyev, Apr 26 2022

A006883 Long period primes: the decimal expansion of 1/p has period p-1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Also called full reptend primes or maximal period primes.
Also called golden primes or long primes.
Here, as opposed to A001913, 2 is a term, because the decimal expansion of 1/2 is 0.5000000000..., so it is periodic with period 1 and pattern 0. - Michel Marcus, Jun 06 2018

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.
  • Carl Friedrich Gauss, "Disquisitiones Arithmeticae"
  • 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.
  • D. H. Lehmer, A note on primitive roots, Scripta Mathematica, vol. 26 (1963), p. 117. [Gives some interesting information about the frequency of maximal period primes and discusses two freak cases.]
  • C. Stanley Ogilvy and John T. Anderson, Excursions in Number Theory, Oxford University Press, 1966, pp. 56-58.
  • 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 A001913.
Cf. A001122 (long period primes in binary).

Programs

  • Maple
    isA006883 := proc(p) if p = 2 then true; elif isprime(p) then RETURN( numtheory[order](10,p) = p-1) ; else false; fi; end: for i from 1 to 300 do p := ithprime(i) ; if isA006883(p) then printf("%d ",p) ; fi; od: # R. J. Mathar, Apr 01 2009
  • 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, 150]], f[ # ] == 1 &] (* Robert G. Wilson v, Sep 14 2004 *)
    maxPeriodQ[p_] := MultiplicativeOrder[10, p] == p-1; maxPeriodQ[2] = True; Select[ Prime[ Range[150]], maxPeriodQ] (* Jean-François Alcover, Jan 07 2013 *)
  • PARI
    print1(2);forprime(p=7,1e3,if(znorder(Mod(10,p))+1==p,print1(", "p))) \\ Charles R Greathouse IV, Feb 27 2011

Formula

From Gerard Schildberger, Jul 02 2005: (Start)
Emil Artin conjectured that the proportion of primes that belong to this sequence can be expressed as:
(2*1-1)(3*2-1)(5*4-1)(7*6-1)(11*10-1)(13*12-1)...
------------------------------------------------- = 0.373955813619202288...
(2*1)(3*2)(5*4)(7*6)(11*10)(13*12)...
(End)
This Artin's constant, Product_{p prime} (1-1/(p^2-p)), is referenced in A005596. - Robert FERREOL, Jun 05 2018

Extensions

More terms from James Sellers, Aug 21 2000
Additional comments from Jason Earls, Apr 06 2001

A167797 Numbers with primitive root 10.

Original entry on oeis.org

7, 17, 19, 23, 29, 47, 49, 59, 61, 97, 109, 113, 131, 149, 167, 179, 181, 193, 223, 229, 233, 257, 263, 269, 289, 313, 337, 343, 361, 367, 379, 383, 389, 419, 433, 461, 487, 491, 499, 503, 509, 529, 541, 571, 577, 593, 619, 647, 659, 701, 709, 727, 743, 811
Offset: 1

Views

Author

T. D. Noe, Nov 12 2009

Keywords

Comments

Numbers n such that the decimal expansion of 1/n has period phi(n). For example, 1/49 has period 42.

Crossrefs

Cf. A001913 (primes with primitive root 10)

Programs

  • Mathematica
    pr=10; Select[Range[2,2000], MultiplicativeOrder[pr,# ] == EulerPhi[ # ] &]
  • PARI
    is(n)=if(gcd(n, 10)>1, return(0)); my(p=eulerphi(n)); znorder(Mod(10, n), p)==p \\ Charles R Greathouse IV, Jan 04 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

A056157 Primes p whose period of reciprocal equals (p-1)/4.

Original entry on oeis.org

53, 173, 277, 317, 397, 769, 773, 797, 809, 853, 1009, 1013, 1093, 1493, 1613, 1637, 1693, 1721, 2129, 2213, 2333, 2477, 2521, 2557, 2729, 2797, 2837, 3329, 3373, 3517, 3637, 3733, 3797, 3853, 3877, 4133, 4241, 4253, 4373, 4493, 4729, 4733, 4877, 5081
Offset: 1

Views

Author

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

Keywords

Comments

Cyclic numbers of the fourth degree (or fourth order): the reciprocals of these numbers belong to one of four different cycles. Each cycle has the (number minus 1)/4 digits.

Crossrefs

Programs

  • 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, 700]], f[ # ] == 4 &] (* Robert G. Wilson v, Aug 02 2000 *)
    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[ # ] == 4 & ] (* Robert G. Wilson v, Aug 02 2000 *)

Extensions

More terms from Robert G. Wilson v, Aug 02 2000

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

A056210 Primes p whose period of reciprocal equals (p-1)/5.

Original entry on oeis.org

11, 251, 1061, 1451, 1901, 1931, 2381, 3181, 3491, 3851, 4621, 4861, 5261, 6101, 6491, 6581, 6781, 7331, 8101, 9941, 10331, 10771, 11251, 11261, 11411, 12301, 14051, 14221, 14411, 15091, 15131, 16061, 16141, 16301, 16651, 16811, 16901
Offset: 1

Views

Author

Robert G. Wilson v, Aug 02 2000

Keywords

Comments

Cyclic numbers of the fifth degree (or fifth order): the reciprocals of these numbers belong to one of five different cycles. Each cycle has the (number minus 1)/5 digits.
From Robert Israel, Apr 02 2018: (Start)
Primes p such that A002371(A000720(p)) = (p-1)/5.
All terms == 1 (mod 10). (End)

Crossrefs

Programs

  • Maple
    select(t -> isprime(t) and numtheory:-order(10, t) = (t-1)/5, [seq(t,t=11..17000,10)]); # Robert Israel, Apr 02 2018
  • 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, 2000]], f[ # ] == 5 &]

Extensions

Entry revised by N. J. A. Sloane, Apr 30 2007

A056211 Primes p whose period of reciprocal equals (p-1)/6.

Original entry on oeis.org

79, 547, 643, 751, 907, 997, 1201, 1213, 1237, 1249, 1483, 1489, 1627, 1723, 1747, 1831, 1879, 1987, 2053, 2551, 2683, 3049, 3253, 3319, 3613, 3919, 4159, 4507, 4519, 4801, 4813, 4831, 4969, 5119, 5443, 5557, 5791, 6079, 6151, 6271, 6373, 6427, 6529
Offset: 1

Views

Author

Robert G. Wilson v, Aug 02 2000

Keywords

Comments

Cyclic numbers of the sixth degree (or sixth order): the reciprocals of these numbers belong to one of six different cycles. Each cycle has the (number minus 1)/6 digits.

Crossrefs

Programs

  • 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, 850]], f[ # ] == 6 &]

Extensions

Edited by N. J. A. Sloane, Apr 30 2007

A087021 Number of distinct prime factors of n-th cyclic number.

Original entry on oeis.org

4, 8, 9, 8, 10, 8, 10, 21, 23, 19, 19, 15, 16, 12, 11, 33, 31, 19, 24, 22, 24, 18, 14, 33, 39, 23, 36, 13, 13, 19, 36, 32, 29, 27, 25, 11, 20, 56, 37, 46, 25, 22, 21, 16, 47, 25, 33, 22, 55, 32, 25
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 30 2003

Keywords

Comments

A004042(n) factorized with Dario Alpern's ECM.
Extended using factors of 10^(A001913(n)-1)-1, see Kamada link.

Examples

			A004042(2) = 142857 = 37*13*11*3^3, therefore a(1) =
#{3,11,13,37} = 4.
		

Crossrefs

Formula

a(n) = A001221(A004042(n+1)).
For n>1, let p = A001913(n). If p is a base-10 Wieferich prime, then a(n) = A102347(p-1) + 2; otherwise a(n) = A102347(p-1) + 1. Also, we have A102347(p-1) = A102347((p-1)/2) + A119704((p-1)/2). - Max Alekseyev, Apr 26 2022

Extensions

a(3) corrected, a(12)-a(42) added by Ray Chandler, Nov 16 2011
a(43)-a(51) from Max Alekseyev, May 13 2022
Previous Showing 11-20 of 62 results. Next