A319894 Number of ordered pairs (i,j) with 0 < i < j < prime(n)/2 such that R(i^4,prime(n)) > R(j^4,prime(n)), where R(k,p) (with p an odd prime) denotes the unique integer r among 0,...,(p-1)/2 with k congruent to r or -r modulo p.
0, 0, 0, 6, 3, 5, 10, 22, 51, 62, 58, 53, 100, 146, 194, 200, 185, 246, 242, 310, 374, 344, 422, 497, 540, 582, 652, 683, 768, 946, 916, 1011, 1180, 1294, 1108, 1387, 1592, 1656, 1829, 2050, 2048, 2386, 2365, 2186, 2184, 2770, 2902, 2890, 3296, 3292, 3754, 3063, 3562, 3650, 4184, 4391, 4164, 4506, 4812
Offset: 2
Keywords
Examples
a(6) = 3 since prime(6) = 13, (R(1^4,13),R(2^4,13),...,R(6^4,13)) = (1,3,3,9,1,9), and (2,5), (3,5) and (4,5) are only pairs (i,j) with 0 < i < j < 13/2 and R(i^4,13) > R(j^4,13).
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 2..1000
- Zhi-Wei Sun, Quadratic residues and related permutations, arXiv:1809.07766 [math.NT], 2018.
Programs
-
Mathematica
f[k_,p_]:=f[k,p]=Abs[Mod[PowerMod[k,4,p],p,-p/2]];Inv[p_]:=Inv[p]=Sum[Boole[f[i,p]>f[j,p]],{j,2,(p-1)/2},{i,1,j-1}];Table[Inv[Prime[n]],{n,2,60}]
Comments