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