OFFSET
1,5
COMMENTS
Conjecture : Let p be an odd prime, and let N be the number of ordered pairs (i,j) with 0 < i < j < p/2 and (i^16 mod p) > (j^16 mod p). When p == 1 (mod 16), we have 2 | N. Also, N == |{0<k<p/4: Leg(k,p) = 1}| (mod 2) if p == 9 (mod 16), where Leg(k,p) denotes the Legendre symbol (k/p). When p == 3 or 5 (mod 8), we have N == floor[(p-3)/8] (mod 2).
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..1000
Zhi-Wei Sun, Quadratic residues and related permutations and identities, arXiv:1809.07766 [math.NT], 2018-2019.
EXAMPLE
a(5) = 3 with prime(5) = 11, and (2^16 mod 11) = 9 greater than (3^16 mod 11) = 3, (4^16 mod 11) = 4 and (5^16 mod 11)) = 5.
MATHEMATICA
r[p_]:=r[p]=Sum[Boole[PowerMod[j, 16, p]>PowerMod[k, 16, p]], {k, 2, p/2}, {j, 1, k-1}];
Print[Table[r[Prime[n]], {n, 1, 60}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jul 06 2019
STATUS
approved