The remainder of $1^2+3^2+5^2+7^2+\cdots+1013^2$ divided by $8$ How to find the remainder of $1^2+3^2+5^2+7^2+\cdots+1013^2$ divided by $8$
 A: As Ishan has suggested, $(2m+1)^2=4m^2+4m+1=8\frac{m(m+1)}2+1\equiv1\pmod8$
So, $\sum_{0\le r\le n}(2r+1)^2\equiv\sum_{0\le r\le n}1\pmod 8\equiv n+1\pmod8$
For $1013=2\cdot506+1,$ so $n=506\implies \sum_{0\le r\le 506}(2r+1)^2\equiv 507\pmod8\equiv3$
A: Hint: 
$(a_1 + a_2 + \dots + a_n) \mod 8 = [(a_1 \mod 8) + (a_2 \mod 8) + \dots + (a_n \mod 8)] \mod 8$
How may terms are there in the sequence? Take the $n^{th}$ term to be $2n - 1$.
A: Of course, you could just sum the series:
$$\sum_{k=1}^n (2 k-1)^2 = \frac{4 n (n+1)(n-1)}{3} + n$$
In this case, $n=507$, and you want $507 (4 \cdot 169 \cdot 506 + 1) \mod{8}$.
A: Hint:  calculate the remainder each of the first few terms contributes.  You should be able to make a reasonable hypothesis, then confirm it.  What is the remainder when $(2k+1)^2$ is divided by $8?$  How many terms are in the sum?
A: The sum is of the form 
$$\sum_{k=0}^{125}((8k+1)^2+(8k+3)^2+(8k+5)^2+(8k+7)^2)+((8.126+1)^2+(8.126+3)^2+(8.126+5)^2)$$
This above one is congruent to(mod 8),
$$(\sum_{k=0}^{125}((1)^2+(3)^2+(5)^2+(7)^2))+(1+3^2+5^2)$$
This is again congruent to,
$$(\sum_{k=0}^{125}(1+1+1+1))+(1+1+1)=126\times 4+3$$
This is congruent to ,
$3(\mod 8)$
This means it will leave a remainder of 3 when divided by 8.
A: Hint $\rm\ mod\ 8\!:\,\ odd^2 = \{\pm 1,\, \pm3\}^2 \equiv \color{#C00}1,\:$ so $\rm\,1^2\!+3^2\!+\,\cdots + (2n\!-\!1)^2\equiv \color{#C00}1+\,\cdots\, + \color{#C00}1\equiv\, n\, $
