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.
%I A380531 #28 Jul 07 2025 10:43:45 %S A380531 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, %T A380531 102,106,9,7,14,130,17,138,37,30,13,162,166,43,178,45,190,48,49,198, %U A380531 210,74,226,19,58,238,12,50,8,262,67,270,23,70 %N A380531 a(n) is the multiplicative order of -4 modulo prime(n); a(1) = 0 for completion. %C A380531 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). %H A380531 Jianing Song, <a href="/A380531/b380531.txt">Table of n, a(n) for n = 1..10000</a> %t A380531 A380531[n_] := If[n == 1, 0, MultiplicativeOrder[-4, Prime[n]]]; %t A380531 Array[A380531, 100] (* _Paolo Xausa_, Jun 29 2025 *) %o A380531 (PARI) a(n,{k=-4}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p))) %Y A380531 Cf. A105876 (primes having primitive root -4). %Y A380531 Cf. bases 2..10: A014664, A062117, A082654, A211241, A211242, A211243, A211244, A211245, A002371. %Y A380531 Cf. bases -2..-10: A337878 (if first term 1), A380482, this sequence, A380532, A380533, A380540, A380541, A380542, A385222. %K A380531 nonn,easy %O A380531 1,2 %A A380531 _Jianing Song_, Jun 27 2025