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-10 of 11 results. Next

A211241 Order of 5 mod n-th prime: least k such that prime(n) divides 5^k-1.

Original entry on oeis.org

1, 2, 0, 6, 5, 4, 16, 9, 22, 14, 3, 36, 20, 42, 46, 52, 29, 30, 22, 5, 72, 39, 82, 44, 96, 25, 102, 106, 27, 112, 42, 65, 136, 69, 37, 75, 156, 54, 166, 172, 89, 15, 19, 192, 196, 33, 35, 222, 226, 114, 232, 119, 40, 25, 256, 262, 67, 27, 276, 140, 282, 292
Offset: 1

Views

Author

T. D. Noe, Apr 11 2012

Keywords

Crossrefs

Cf. A019335 (full reptend primes in base 5).

Programs

  • GAP
    A000040:=Filtered([1..350],IsPrime);;
    List([1..Length(A000040)],n->OrderMod(5,A000040[n])); # Muniru A Asiru, Feb 06 2019
    
  • Mathematica
    nn = 5; Table[If[Mod[nn, p] == 0, 0, MultiplicativeOrder[nn, p]], {p, Prime[Range[100]]}]
  • PARI
    a(n,{base=5}) = my(p=prime(n)); if(base%p, znorder(Mod(base,p)), 0) \\ Jianing Song, May 13 2024

A019334 Primes with primitive root 3.

Original entry on oeis.org

2, 5, 7, 17, 19, 29, 31, 43, 53, 79, 89, 101, 113, 127, 137, 139, 149, 163, 173, 197, 199, 211, 223, 233, 257, 269, 281, 283, 293, 317, 331, 353, 379, 389, 401, 449, 461, 463, 487, 509, 521, 557, 569, 571, 593, 607, 617, 631, 641, 653, 677, 691, 701, 739, 751, 773, 797
Offset: 1

Views

Author

Keywords

Comments

To allow primes less than the specified primitive root m (here, 3) to be included, we use the essentially equivalent definition "Primes p such that the multiplicative order of m mod p is p-1". This comment applies to all of A019334-A019421. - N. J. A. Sloane, Dec 02 2019
From Jianing Song, Apr 27 2019: (Start)
All terms except the first are congruent to 5 or 7 modulo 12. If we define
Pi(N,b) = # {p prime, p <= N, p == b (mod 12)};
Q(N) = # {p prime, 2 < p <= N, p in this sequence},
then by Artin's conjecture, Q(N) ~ C*N/log(N) ~ 2*C*(Pi(N,5) + Pi(N,7)), where C = A005596 is Artin's constant.
If we further define
Q(N,b) = # {p prime, p <= N, p == b (mod 12), p in this sequence},
then we have:
Q(N,5) ~ (3/5)*Q(N) ~ (12/5)*C*Pi(N,5);
Q(N,7) ~ (2/5)*Q(N) ~ ( 8/5)*C*Pi(N,7).
For example, for the first 1000 terms except for a(1) = 2, there are 593 terms == 5 (mod 12) and 406 terms == 7 (mod 12). (End)

Crossrefs

Cf. A005596, A001122 (primitive root 2).

Programs

  • Mathematica
    pr=3; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == #-1 &]
  • PARI
    isok(p) = isprime(p) && (p!=3) && (znorder(Mod(3, p))+1 == p); \\ Michel Marcus, May 12 2019

A167793 Numbers with primitive root 5.

Original entry on oeis.org

2, 3, 6, 7, 9, 14, 17, 18, 23, 27, 34, 37, 43, 46, 47, 49, 53, 54, 73, 74, 81, 83, 86, 94, 97, 98, 103, 106, 107, 113, 137, 146, 157, 162, 166, 167, 173, 193, 194, 197, 206, 214, 223, 226, 227, 233, 243, 257, 263, 274, 277, 283, 289, 293, 307, 314, 317, 334, 343, 346
Offset: 1

Views

Author

T. D. Noe, Nov 12 2009

Keywords

Crossrefs

Cf. A019335 (primes with primitive root 5)

Programs

  • Mathematica
    pr=5; Select[Range[2,2000], MultiplicativeOrder[pr,# ] == EulerPhi[ # ] &]
  • PARI
    is(n)=if(n%5==0, return(0)); my(p=eulerphi(n)); znorder(Mod(5, n), p)==p \\ Charles R Greathouse IV, Jan 04 2025

A167408 Orderly numbers: a number n is orderly if there exists some number k > tau(n) such that the set of the divisors of n is congruent to the set {1,2,...,tau(n)} mod k.

Original entry on oeis.org

1, 2, 5, 7, 8, 9, 11, 12, 13, 17, 19, 20, 23, 27, 29, 31, 37, 38, 41, 43, 47, 52, 53, 57, 58, 59, 61, 67, 68, 71, 72, 73, 76, 79, 83, 87, 89, 97, 101, 103, 107, 109, 113, 117, 118, 124, 127, 131, 133, 137, 139, 149, 151, 157, 158, 162, 163, 164, 167, 173, 177, 178, 179
Offset: 1

Views

Author

Andrew Weimholt, Nov 03 2009

Keywords

Comments

n: {divisors(n)} == {1,2,...,tau(n)} mod k
-------------------------------------------
1: {1} == {1} mod 2
2: {1,2} == {1,2} mod 3
5: {1,5} == {1,2} mod 3
7: {1,7} == {1,2} mod 5
8: {1,2,8,4} == {1,2,3,4} mod 5
9: {1,9,3} == {1,2,3} mod 7
11: {1,11} == {1,2} mod 3 or 9
12: {1,2,3,4,12,6} == {1,2,3,4,5,6} mod 7
13: {1,13} == {1,2} mod 11
17: {1,17} == {1,2} mod 3,5, or 15
19: {1,19} == 1,2 mod 17
20: {1,2,10,4,5,20} == {1,2,3,4,5,6} mod 7
23: {1,23} == {1,2} mod 3,7, or 21
27: {1,27,3,9} == {1,2,3,4} mod 5
29: {1,29} == {1,2} mod 3,9, or 27
31: {1,31} == {1,2} mod 29
37: {1,37} == 1,2 mod 5,7, or 35
38: {1,2,38,19} == {1,2,3,4} mod 5
41: {1,41} == {1,2} mod 3,13, or 39
43: {1,43} == {1,2} mod 41
47: {1,47} == {1,2} mod 3,5,9,15, or 45
52: {1,2,52,4,26,13} == {1,2,3,4,5,6} mod 7
53: {1,53} == {1,2} mod 3,17, or 51
57: {1,57,3,19} == {1,2,3,4} mod 5
58: {1,2,58,29} == {1,2,3,4} mod 5
59: {1,59} == {1,2} mod 3,19, or 57
61: {1,61} == {1,2} mod 59
67: {1,67} == {1,2} mod 5,13, or 65
68: {1,2,17,4,68,34} == {1,2,3,4,5,6} mod 7
71: {1,71} == {1,2} mod 3,23, or 69
72: {1,2,3,4,18,6,72,8,9,36,24,12} == {1,2,3,4,5,6,7,8,9,10,11,12} mod 13
73: {1,73} == {1,2} mod 71
76: {1,2,38,4,19,76} == {1,2,3,4,5,6} mod 7
79: {1,79} == {1,2} mod 7,11, or 77
83: {1,83} == {1,2} mod 3,9,27, or 81
87: {1,87,3,29} == {1,2,3,4} mod 5
89: {1,89} == {1,2} mod 3,29, or 87
97: {1,97} == {1,2} mod 5,19, or 95
The primes other than 3 are orderly.
Numbers of the form 4p are orderly when p is an odd prime congruent to 3,5, or 6 mod 7.
For primes, k values can be p-2 or a divisor of p-2 other than 1.
T. D. Noe observed that for composite orderly numbers, n, k seems to be one of the three values: tau(n)+1, tau(n)+3, tau(n)+4.
The composite numbers with k = tau(n)+4 are of the form p^2, where prime p == 3 mod 7.
The orderly numbers with k = tau(n)+3 come in many forms. See A168003. It appears that tau(n)+3 is a prime with primitive root 2 (A001122).
The forms for composite orderly numbers with k = tau(n)+1 are too numerous to list here, but seem to occur for any prime k > 3.
Let p be any prime. Then p^(m-2) is in this sequence if m is a prime with primitive root p. For example, 2^(m-2) is here for every m in A001122; 3^(m-2) is here for every m in A019334; 5^(m-2) is here for every m in A019335. For every prime p, there appear to be an infinite number of prime powers p^(m-2) here. All these numbers are actually very orderly (A167409) because we can choose k = tau(n)+1. - T. D. Noe, Nov 04 2009

Examples

			12 is an orderly number because 12's divisors are 1,2,3,4,6,12 and
   1 == 1 (mod 7)
   2 == 2 (mod 7)
   3 == 3 (mod 7)
   4 == 4 (mod 7)
  12 == 5 (mod 7)
   6 == 6 (mod 7)
		

Crossrefs

Cf. A167409 = very orderly numbers (k = tau(n) + 1).
Cf. A167410 = disorderly numbers = numbers not in this sequence.
Cf. A167411 = minimal k values for the orderly numbers.

Programs

  • Mathematica
    orderlyQ[n_] := (For[dd = Divisors[n]; tau = Length[dd]; k = 3, k <= Max[tau + 4, Last[dd] - 2], k++, If[ Union[ Mod[dd, k]] == Range[tau], Return[True]]]; False); Select[ Range[180], orderlyQ] (* Jean-François Alcover, Aug 19 2013 *)

Extensions

Minor editing by N. J. A. Sloane, Nov 06 2009
Information about the tau(n)+3 orderly numbers corrected by T. D. Noe, Nov 16 2009

A384948 Primes p == 3 (mod 4) such that 5 is a primitive root of integers modulo p, but 2+-i are not primitive roots of Gaussian integers modulo p.

Original entry on oeis.org

83, 307, 347, 503, 587, 863, 947, 1103, 1223, 1523, 1567, 1667, 1787, 1907, 2063, 2087, 2267, 2663, 2683, 2687, 2903, 2963, 3167, 3343, 3347, 3623, 3803, 3863, 4283, 4463, 4523, 4643, 4967, 5147, 5303, 5387, 5507, 5563, 5807, 5843, 6047, 6203, 6607, 6863, 6983, 7187, 7247, 7523, 7583
Offset: 1

Views

Author

Jianing Song, Jun 20 2025

Keywords

Comments

For p = A002145(k), A385165(k) divides (p+1) * ord(5,p), since we have (2+-i)^(p+1) == 5 (mod p). Hence if 2+-i are primitive roots of Gaussian integers modulo p, then 5 is a primitive root of integers modulo p. This sequence lists p such that the converse does not hold.

Examples

			5 is a primitive root modulo 83, but the multiplicative order of 2+-i modulo 83 in Gaussian integers is not 83^2 - 1 = 6888; it is 2296 = 6888/3. In other words, 2+-i are not generators of (Z[i]/83Z[i])*.
		

Crossrefs

By definition, subsequence of A019335, A122870, and A385168.

Programs

  • PARI
    isprim(p) = my(f = factor(p^2-1)[,1]~); for(i=1, #f, if(Mod([2, -1; 1, 2], p)^((p^2-1)/f[i]) == 1, return(0))); return(1) \\ for a prime p == 3 (mod 4), determines if 2+-i are primitive roots modulo p
    isA384948(p) = isprime(p) && (p%4==3) && znorder(Mod(5,p))==p-1 && !isprim(p)

A071522 Numbers n such that x^n + x^(n-1) + x^(n-2) + ... + x + 1 is irreducible over GF(5).

Original entry on oeis.org

1, 2, 6, 16, 22, 36, 42, 46, 52, 72, 82, 96, 102, 106, 112, 136, 156, 166, 172, 192, 196, 222, 226, 232, 256, 262, 276, 282, 292, 306, 316, 346, 352, 372, 382, 396, 432, 442, 462, 466, 502, 522, 546, 556, 562, 576, 586, 592, 606, 612, 616, 646, 652, 672, 676
Offset: 1

Views

Author

Robert G. Wilson v, Jun 22 2002

Keywords

Comments

Numbers k = p - 1 such that p is a prime with primitive root 5. - Joerg Arndt, Jun 25 2020

Crossrefs

Cf. A071642. Contained in A006093.

Programs

  • Maple
    filter:= proc(n)
    isprime(n+1) and numtheory:-order(5,n+1)=n
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Jun 25 2020
  • Mathematica
    Select[Prime[Range[1000]], MultiplicativeOrder[5, #] == # - 1&] - 1 (* Jean-François Alcover, Aug 16 2020 *)
  • PARI
    forprime(p=2, 10^3, if(p==5,next()); if(znorder(Mod(5,p))==p-1, print1(p-1,", "))); \\ Joerg Arndt, Jun 25 2020

Formula

a(n) = A019335(n) - 1. - Joerg Arndt, Jun 25 2020

Extensions

a(1)=1 inserted by Robert Israel, Jun 24 2020

A103491 Multiplicative suborder of 5 (mod n) = sord(5, n).

Original entry on oeis.org

0, 0, 1, 1, 1, 0, 1, 3, 2, 3, 0, 5, 2, 2, 3, 0, 4, 8, 3, 9, 0, 3, 5, 11, 2, 0, 2, 9, 6, 7, 0, 3, 8, 10, 8, 0, 6, 18, 9, 4, 0, 10, 3, 21, 5, 0, 11, 23, 4, 21, 0, 16, 4, 26, 9, 0, 6, 18, 7, 29, 0, 15, 3, 3, 16, 0, 10, 11, 16, 11, 0, 5, 6, 36, 18, 0, 9, 30, 4, 39, 0, 27, 10, 41, 6, 0, 21, 7, 10, 22, 0
Offset: 0

Views

Author

Harry J. Smith, Feb 08 2005

Keywords

Comments

a(n) is minimum e for which 5^e = +/-1 mod n, or zero if no e exists.
For n > 2, a(n) <= (n-1)/2, with equality if (but not only if) n is in A019335. - Robert Israel, Mar 20 2020

References

  • H. Cohen, Course in Computational Algebraic Number Theory, Springer, 1993, p. 25, Algorithm 1.4.3

Crossrefs

Cf. A019335.

Programs

  • Maple
    f:= proc(n) local x;
      if n mod 5 = 0 then return 0 fi;
      x:= numtheory:-mlog(-1,5,n);
      if x <> FAIL then x else numtheory:-order(5,n) fi
    end proc:
    f(1):= 0:
    map(f, [$0..100]); # Robert Israel, Mar 20 2020
  • Mathematica
    Suborder[k_, n_] := If[n > 1 && GCD[k, n] == 1, Min[MultiplicativeOrder[k, n, {-1, 1}]], 0];
    a[n_] := Suborder[5, n];
    a /@ Range[0, 100] (* Jean-François Alcover, Mar 21 2020, after T. D. Noe in A003558 *)

A241044 Primes having primitive roots 2, 3, and 5.

Original entry on oeis.org

53, 173, 197, 293, 317, 557, 653, 677, 773, 797, 907, 1277, 1373, 1483, 1493, 1637, 1733, 1747, 1987, 1997, 2083, 2213, 2237, 2333, 2357, 2467, 2477, 2683, 2693, 2837, 2957, 3307, 3413, 3533, 3547, 3557, 3643, 3677, 3797, 3917, 4003, 4013, 4133, 4157
Offset: 1

Views

Author

T. D. Noe, Apr 16 2014

Keywords

Crossrefs

Programs

  • Mathematica
    fQ[p_, n_] := MultiplicativeOrder[p, n] == n - 1; Select[Prime[Range[600]], fQ[2, #] && fQ[3, #] && fQ[5, #] &]
    Select[Prime[Range[600]],SequenceCount[PrimitiveRootList[#],{2,3,5}]>0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 03 2018 *)

A241045 Primes having primitive roots 2, 3, 5, and 7.

Original entry on oeis.org

173, 293, 677, 773, 797, 907, 1277, 1637, 1747, 2083, 2357, 2477, 2693, 2957, 3533, 3797, 4133, 4157, 4373, 4493, 4603, 4637, 4877, 4973, 5333, 5477, 5717, 5813, 5923, 6053, 6173, 6317, 6547, 6653, 6763, 7013, 7517, 8237, 8573, 8693, 8837, 9173, 9533
Offset: 1

Views

Author

T. D. Noe, Apr 16 2014

Keywords

Crossrefs

Programs

  • Mathematica
    fQ[p_, n_] := MultiplicativeOrder[p, n] == n - 1; Select[Prime[Range[1200]], fQ[2, #] && fQ[3, #] && fQ[5, #] && fQ[7, #] &]
    Select[Prime[Range[1200]],SubsetQ[PrimitiveRootList[#],{2,3,5,7}]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 16 2020 *)

A241047 Primes having primitive roots 2, 3, 5, 7, 11, and 13.

Original entry on oeis.org

293, 2477, 4373, 6173, 7013, 9173, 9677, 10853, 13037, 13397, 13613, 13877, 14957, 15413, 17093, 17597, 18413, 18917, 19157, 22277, 22613, 24317, 26813, 27653, 27893, 29333, 30197, 31517, 33893, 34613, 34877, 35573, 37253, 40493, 41117, 41333, 42437
Offset: 1

Views

Author

T. D. Noe, Apr 16 2014

Keywords

Crossrefs

Programs

  • Mathematica
    fQ[p_, n_] := MultiplicativeOrder[p, n] == n - 1; Select[Prime[Range[4500]], fQ[2, #] && fQ[3, #] && fQ[5, #] && fQ[7, #] && fQ[11, #] && fQ[13, #] &]
Showing 1-10 of 11 results. Next