<s>[INST] Find the remainder when $\sum_{n=1}^{2015}{n^2\times2^n}$is divided by 23. 
Find the remainder when $\sum_{n=1}^{2015}{n^2\times2^n}$is divided by 23.

I am completely stuck at this to even start , here's the samll thing that I have noticed .
When $2^{11}$ is divided by 23 , the remainder is $1$ , so $2^{11k+r}$ is equivalent to $2^r$ (mod 23) , for any natural number $k$.
Apart from this nothing useful thing came to my mind .
Could someone please help me to find the remainder ?
Thanks !
 [/INST] So what you said and the fact that $n^2 \equiv(n \mod 23)^2  \pmod{23}$ and $12 \equiv -11 \pmod{23}$ and $13 \equiv -10 \pmod {23}$ and so on makes a periodic sum: (let the sum be $S$)
$$S \equiv 1^2\cdot2^1+\dots+11^2\cdot2^{11}$$
$$+(-11)^2\cdot2^{1}+(-10)^2\cdot2^2+\dots+(-1)^2\cdot2^{11}+0+\dots$$
and of course the square makes the negative go out. So we need to find out that $2015=23\cdot87+14$ which makes
$$S \equiv 87(1^2\cdot2^1+\dots+11^2\cdot2^{11}+11^2\cdot2^{1}+10^2\cdot2^2+\dots+1^2\cdot2^{11}+0)$$
$$+1^2\cdot2^1+\dots+11^2\cdot2^{11}+11^2\cdot2^{1}+10^2\cdot2^2+9^2\cdot2^3 \tag{since $14\equiv -9 \pmod{23}$}$$
and that makes the rest easy to compute.
</s>