Let $p$$\ p\ $ be a prime. Prove that if $p\equiv 3\pmod{4}$$\ p\equiv 3\pmod{4}\ $ then the sum$$S=\sum_{i=0}^{p-1}\left(\frac{i^3+6i^2+i}{p}\right)=0$$What
$$ S=\sum_{k=0}^{p-1}\left(\frac{k^3+6k^2+k}{p}\right)=0 $$
What is the value of the sum $S$$\ S\ $ when $p\equiv 1\pmod{4}$?$\ p\equiv 1\pmod{4}\,?\ $ When $p\equiv 3\pmod{4}$$\ p\equiv 3\pmod{4}\ $ all i know is that $(-1|p)=-1$$\ (-1|p)=-1\ $ but i am not sure if that gives me anything.