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 23 results. Next

A380531 a(n) is the multiplicative order of -4 modulo prime(n); a(1) = 0 for completion.

Original entry on oeis.org

0, 2, 1, 6, 10, 3, 4, 18, 22, 7, 10, 9, 5, 14, 46, 13, 58, 15, 66, 70, 18, 78, 82, 22, 24, 25, 102, 106, 9, 7, 14, 130, 17, 138, 37, 30, 13, 162, 166, 43, 178, 45, 190, 48, 49, 198, 210, 74, 226, 19, 58, 238, 12, 50, 8, 262, 67, 270, 23, 70
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Comments

a(n) divides (p-1)/4 if p = prime(n) == 1 (mod 4), since (-4)^((p-1)/4) == (+-1+-i)^(p-1) == 1 (mod p), where i^2 == -1 (mod p).

Crossrefs

Cf. A105876 (primes having primitive root -4).
Cf. bases -2..-10: A337878 (if first term 1), A380482, this sequence, A380532, A380533, A380540, A380541, A380542, A385222.

Programs

  • Mathematica
    A380531[n_] := If[n == 1, 0, MultiplicativeOrder[-4, Prime[n]]];
    Array[A380531, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-4}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A380532 a(n) is the multiplicative order of -5 modulo prime(n); a(3) = 0 for completion.

Original entry on oeis.org

1, 1, 0, 3, 10, 4, 16, 18, 11, 7, 6, 36, 20, 21, 23, 52, 58, 15, 11, 10, 72, 78, 41, 44, 96, 50, 51, 53, 54, 112, 21, 130, 136, 138, 74, 150, 156, 27, 83, 172, 178, 30, 38, 192, 196, 66, 70, 111, 113, 57, 232, 238, 40, 50, 256, 131, 134, 54, 276, 140
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105877 (primes having primitive root -5).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, this sequence, A380533, A380540, A380541, A380542, A385222.

Programs

  • Mathematica
    A380532[n_] := If[n == 3, 0, MultiplicativeOrder[-5, Prime[n]]];
    Array[A380532, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-5}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A380533 a(n) is the multiplicative order of -6 modulo prime(n); a(1) = a(2) = 0 for completion.

Original entry on oeis.org

0, 0, 2, 1, 5, 12, 16, 18, 22, 7, 3, 4, 40, 6, 46, 13, 29, 60, 66, 70, 36, 39, 41, 88, 12, 5, 51, 53, 108, 112, 63, 65, 136, 46, 74, 75, 156, 54, 166, 86, 89, 60, 38, 96, 7, 99, 210, 111, 113, 228, 232, 34, 20, 125, 256, 262, 67, 135, 276, 56
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105878 (primes having primitive root -6).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, this sequence, A380540, A380541, A380542, A385222.

Programs

  • Mathematica
    A380533[n_] := If[n < 3, 0, MultiplicativeOrder[-6, Prime[n]]];
    Array[A380533, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-6}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A380540 a(n) is the multiplicative order of -7 modulo prime(n); a(4) = 0 for completion.

Original entry on oeis.org

1, 2, 4, 0, 5, 12, 16, 6, 11, 14, 30, 18, 40, 3, 46, 13, 58, 60, 33, 35, 24, 39, 82, 88, 96, 100, 102, 53, 54, 7, 63, 130, 68, 138, 37, 75, 52, 81, 166, 172, 89, 12, 5, 24, 49, 198, 105, 74, 226, 228, 116, 119, 240, 250, 256, 131, 268, 270, 69, 20
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105879 (primes having primitive root -7).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, A380533, this sequence, A380541, A380542, A385222.

Programs

  • Mathematica
    A380540[n_] := If[n == 4, 0, MultiplicativeOrder[-7, Prime[n]]];
    Array[A380540, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-7}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A380541 a(n) is the multiplicative order of -8 modulo prime(n); a(1) = 0 for completion.

Original entry on oeis.org

0, 1, 4, 2, 5, 4, 8, 3, 22, 28, 10, 12, 20, 7, 46, 52, 29, 20, 11, 70, 6, 26, 41, 22, 16, 100, 34, 53, 12, 28, 14, 65, 68, 23, 148, 10, 52, 27, 166, 172, 89, 60, 190, 32, 196, 66, 35, 74, 113, 76, 58, 238, 8, 25, 16, 262, 268, 90, 92, 35
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105880 (primes having primitive root -8).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, A380533, A380540, this sequence, A380542, A385222.

Programs

  • Mathematica
    A380541[n_] := If[n == 1, 0, MultiplicativeOrder[-8, Prime[n]]];
    Array[A380541, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-8}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

Formula

a(n) = ord(-2,p)/gcd(ord(-2,p),3) for p != 2, where p = prime(n), and ord(a,m) is the multiplicative order of a modulo m. Note that ord(-2,p) = A337878(n) for n > 2.

A380542 a(n) is the multiplicative order of -9 modulo prime(n); a(2) = 0 for completion.

Original entry on oeis.org

1, 0, 1, 6, 10, 6, 8, 18, 22, 7, 30, 18, 4, 42, 46, 13, 58, 10, 22, 70, 3, 78, 82, 44, 24, 25, 34, 106, 54, 56, 126, 130, 68, 138, 37, 50, 78, 162, 166, 43, 178, 90, 190, 8, 49, 198, 210, 222, 226, 114, 116, 238, 60, 250, 128, 262, 67, 30, 138, 140
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105881 (primes having primitive root -9).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, A380533, A380540, A380541, this sequence, A385222.

Programs

  • Mathematica
    A380542[n_] := If[n == 2, 0, MultiplicativeOrder[-9, Prime[n]]];
    Array[A380542, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-9}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A385222 a(n) is the multiplicative order of -10 modulo prime(n); a(1) = a(3) = 0 for completion.

Original entry on oeis.org

0, 2, 0, 3, 1, 3, 16, 9, 11, 28, 30, 6, 10, 42, 23, 26, 29, 60, 66, 70, 8, 26, 82, 44, 96, 4, 17, 106, 108, 112, 21, 65, 8, 23, 148, 150, 39, 162, 83, 86, 89, 180, 190, 192, 49, 198, 15, 111, 226, 228, 232, 14, 15, 25, 256, 131, 268, 10, 138, 28
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A007348 (primes having primitive root -10).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, A380533, A380540, A380541, A380542, this sequence.

Programs

  • Mathematica
    A385222[n_] := If[n == 1 || n == 3, 0, MultiplicativeOrder[-10, Prime[n]]];
    Array[A385222, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-10}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A385227 Odd multiplicative orders of 4 modulo primes.

Original entry on oeis.org

1, 3, 5, 9, 11, 5, 7, 23, 29, 33, 35, 9, 39, 41, 11, 51, 53, 7, 65, 69, 15, 81, 83, 89, 95, 99, 105, 37, 113, 29, 119, 25, 131, 135, 35, 47, 51, 155, 15, 21, 173, 179, 183, 189, 191, 209, 43, 73, 221, 231, 233, 239, 243, 245, 83, 251, 261, 273, 281, 57, 293
Offset: 1

Views

Author

Jianing Song, Jun 22 2025

Keywords

Comments

a(n) is the multiplicative order of 4 modulo A385221(n).
Odd elements in A082654.

Crossrefs

Cf. A082654, A385221 (corresponding primes).
Cf. other bases: A139686 (base 2), A385226 (base 3), this sequence (base 4), A385193 (base 5), A385228 (base -2), A385229 (base -3), A385230 (base -4), A385231 (base -5).

Programs

  • Mathematica
    Select[Map[MultiplicativeOrder[4, #] &, Prime[Range[200]]], OddQ] (* Paolo Xausa, Jun 28 2025 *)
  • PARI
    forprime(p=3, 1e4, z=znorder(Mod(4, p)); if(z%2, print1(z, ", ")))

A372801 Order of 16 modulo the n-th prime: least k such that prime(n) divides 16^k-1.

Original entry on oeis.org

1, 1, 3, 5, 3, 2, 9, 11, 7, 5, 9, 5, 7, 23, 13, 29, 15, 33, 35, 9, 39, 41, 11, 12, 25, 51, 53, 9, 7, 7, 65, 17, 69, 37, 15, 13, 81, 83, 43, 89, 45, 95, 24, 49, 99, 105, 37, 113, 19, 29, 119, 6, 25, 4, 131, 67, 135, 23, 35, 47, 73, 51, 155, 39, 79, 15, 21, 173, 87, 22, 179
Offset: 2

Views

Author

Jianing Song, May 13 2024

Keywords

Comments

a(n) is the period of the expansion of 1/prime(n) in hexadecimal.

Crossrefs

Cf. A302141 (order of 16 mod 2n+1).

Programs

  • PARI
    a(n) = znorder(Mod(16, prime(n))).

Formula

a(n) = A014664(n)/gcd(4, A014664(n)) = A082654(n)/gcd(2, A082654(n)).
a(n) <= (prime(n) - 1)/2.

A372797 Smallest prime p such that the multiplicative order of 4 modulo p is 2*n, or 0 if no such prime exists.

Original entry on oeis.org

3, 17, 31, 73, 151, 433, 631, 337, 127, 241, 331, 601, 4421, 673, 3061, 257, 1429, 1657, 1103, 3121, 2143, 1321, 18539, 1777, 2351, 37441, 2971, 2857, 3191, 17401, 683, 15809, 17029, 9929, 38431, 1801, 11471, 63689, 49999, 13121, 17467, 21169, 83077, 25609, 5581, 5153, 26227
Offset: 1

Views

Author

Jianing Song, May 13 2024

Keywords

Comments

First prime p such that the expansion of 1/p has period (p-1)/(2*n) in base 4. Also the first prime p such that {k/p : 1 <= k <= p-1} has 2*n different cycles when written out in base 4.
Since ord(a^m,k) = ord(a,k)/gcd(m,ord(a,k)) for gcd(a,k) = 1, we have that (p-1)/ord(4,p) = ((p-1)/ord(2,p)) * gcd(2,ord(2,p)) is always even. Here ord(a,k) is the multiplicative order of a modulo k.

Examples

			In the following examples let () denote the reptend. The prime numbers themselves and the fractions are written out in decimal.
The base-4 expansion of 1/3 is 0.(1), so the reptend has length 1 = (3-1)/2. Also, the base-4 expansions of 1/3 = 0.(1) and 2/3 = 0.(2) have two cycles 1 and 2. 3 is the smallest such prime, so a(1) = 3.
The base-4 expansion of 1/17 is 0.(0033), so the reptend has length 4 = (17-1)/4. Also, the base-4 expansions of 1/17, 2/17, ..., 16/17 have four cycles 0033, 0132, 1023 and 1122. 17 is the smallest such prime, so a(2) = 17.
The base-4 expansion of 1/31 is 0.(00133), so the reptend has length 5 = (31-1)/6. Also, the base-4 expansions of 1/31, 2/31, ..., 30/31 have three cycles 00201, 01203, 02211, 03213, 11223 and 13233. 13 is the smallest such prime, so a(3) = 13.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = For[p = 2, True, p = NextPrime[p], If[MultiplicativeOrder[4, p] == (p-1)/(2n), Return[p]]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 100}] (* Jean-François Alcover, Nov 24 2024 *)
  • PARI
    a(n,{base=4}) = forprime(p=2, oo, if((base%p) && znorder(Mod(base,p)) == (p-1)/(n * if(issquare(base), 2, 1)), return(p)))
Previous Showing 11-20 of 23 results. Next