OFFSET
1,1
COMMENTS
Of course if a and m are integers, it doesn't matter if the base ring is Z or Z[i] for ord(a,m).
Since in this case d(p) divides (p^2-1)/2, 5 must be a quadratic residue modulo p (see A385165).
By definition, a term that is in neither A385169 nor A385179 must be congruent to 31 or 79 modulo 80. The smallest such term is p = 1759 (ord(2+-i,p) = ((p+1)/4) * ord(5,p) = 128920); even if 1039 == 79 (mod 80), we have ord(2+-i,p) = ((p+1)/8) * ord(5,p) = 22490 == 2 (mod 4), which means that 1039 is in A385179.
LINKS
Jianing Song, Table of n, a(n) for n = 1..10000
EXAMPLE
571 is a term since the multiplicative order of 2+-i modulo 571 is 40755, and (572*ord(5,571))/40755 = 4 is divisible by 4.
PROG
(PARI) quot(p) = my(z = znorder(Mod(5, p)), d = divisors((p+1)*z)); for(i=1, #d, if(Mod([2, -1; 1, 2], p)^d[i] == 1, return((p+1)*z/d[i]))) \\ for a prime p == 3 (mod 4), returns (p+1) * ord(5, p) / ord(2+-i, p)
isA385180(p) = isprime(p) && p%4==3 && quot(p)%4==0
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jianing Song, Jun 20 2025
STATUS
approved
