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.

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)))