OFFSET
1,5
COMMENTS
Conjecture 1: For any prime p == 5 (mod 6), the difference card{0 < k < p/2: {k^3/p} > 1/2} - (p+1)/6 is nonnegative and even.
Conjecture 2: For any prime p not congruent to 1 modulo 5, the number of positive integers k < p/2 with {k^5/p} > 1/2 is even.
Conjecture 3: For any prime p == 5 (mod 12), the difference card{0 < k < p/2: {k^6/p} > 1/2} - (p-5)/12 is positive and odd.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Quadratic residues and related permutations and identities, arXiv:1809.07766 [math.NT], 2018.
EXAMPLE
a(3) = 1 since prime(3) = 5 and {0 < k < 5/2: {k^3/5} > 1/2} = {2}.
a(4) = 1 since prime(4) = 7 and {0 < k < 7/2: {k^3/7} > 1/2} = {3}.
a(5) = 2 since prime(5) = 11 and {0 < k < 11/2: {k^3/11} > 1/2} = {2,4}.
MATHEMATICA
s[p_]:=s[p]=Sum[Boole[Mod[k^3, p]>p/2], {k, 1, (p-1)/2}]; Table[s[Prime[n]], {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 04 2018
STATUS
approved