OFFSET
1,5
COMMENTS
Conjecture: Let p be a prime with p == 3 (mod 4), and let T(p) denote the number of ordered pairs (j,k) with 0 < j < k < p/2 and (j*(j+1) mod p) > (k*(k+1) mod p). Then T(p) == floor((p+1)/8) (mod 2).
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..2000
Zhi-Wei Sun, Quadratic residues and related permutations and identities, arXiv:1809.07766 [math.NT], 2018.
EXAMPLE
a(4) = 1 since prime(4) = 7 and (1*2 mod 7, 2*3 mod 7, 3*4 mod 7) = (1,6,5) with 6 > 5.
MATHEMATICA
T[p_]:=T[p]=Sum[Boole[Mod[j(j+1), p]>Mod[k(k+1), p]], {k, 2, (p-1)/2}, {j, 1, k-1}]; Table[T[Prime[n]], {n, 1, 60}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 08 2018
STATUS
approved