You are so close to figuring this out on your own!
Here's a "meta"-question and some ideas for you.
Meta-question: What do think the purpose of this exercise is? Other than busy work, of course. What do you think will be learned?
ideas: 1) If $a$ is a root to $1 + x + x^2$ then as $1+x+x^2$ is a quadratic there are two possible values for $a$ which we can figure out via the quadratic equation. Because $b^2 - 4ac = (1)^2 - 4(1)(1) = - 3< 0$ neither of these values are real.
It could be illuminating to actually figure out the values of $a$, to graph them on the complex plane, and to figure out what $a^k$ would be. But that's not actually the point of the problem.
2) If $a$ is a root to $1 + x + x^2$, then $a$ is also a root to $(1-x)(1 + x + x^2) = x^3 -1$.
$x^3 -1$ is a third degree polynomial and has $3$ roots. One of them is the real $x = 1$. The other non-real two roots are the two possible values of $a$.
And that is the answer to the meta-question. $a$ is what is called a third root of unity. The polynomial $x^k - 1=0$ will have $k$ complex roots. $x=1$ will be one of them. If $k$ is even $x = -1$ will be another. The rest will be complex and they will be roots of the polyomial $1 + x + x^2 + ..... + x^{k-1}$.
There will be $n-1$ such roots and they will all but so that $x^k = 1$.
3) Another way of thinking about 2) above:
$1 + a + a^2 = 0$
$a(1 + a + a^2) = 0*a = 0$
$a + a^2 + a^3 = 0$
$1 + a + a^2 + a^3 = 1 + 0 = 1$
$(1 + a + a^2) + a^3 = 1$
$a^3 = 1$.
So $1 + a + a^2 + a^3 + ....... + a^{2017} = $
$(1+a + a^2)(1 + a^3 + a^6 + ....... + a^{2013}) + a^{2016} + a^{2017}=$
$0*(1+1+........ + 1) + a^{2016}(1 + a) = $
$1(1+a)= 1 + a$
=== post script ====
Okay. Back to 1)...
$a^2 + a + 1 = 0$
$a = \frac {-1 \pm \sqrt{-3}}2 = -\frac 12 \pm i\frac {\sqrt{3}}2$.
(This should look familiar. If $x = -\frac 12$ and $y=\pm \frac {\sqrt{3}}2$ what kind of angle is being formed by $(x,y)$ and $(0,0)$ and the $x$-axis?)
(Food for thought: What kind of shape is made be the three points $a, -a$ and $1$. i.e. what shape is made by the three third roots of unity?)
(What shape do you think will be made by the $k$ $k$-roots of unity?)
An $1 + a + .... +a^{2017} = 1 + a = \frac 12 \pm i\frac {\sqrt{3}}2$.
One thing very much worth noting:
$a^0 = 1$
$a^1 = a = -\frac 12 \pm i\frac {\sqrt{3}}2$
$a^2 = (-\frac 12 \pm i\frac {\sqrt{3}}2)^2 =$
$\frac 14 - \frac 34 \pm i*2(-\frac 12)(\frac{\sqrt{3}}2) =$
$= -\frac 12 \mp i\frac {\sqrt{3}}2 = -a$.
$a^3 = (-\frac 12 \pm i\frac {\sqrt{3}}2)(-\frac 12 \mp \frac {\sqrt{3}}2) =$
$= \frac 14 - (-\frac 34) = \frac 14 + \frac 34 = 1$.
if I start the grouping at the end of the expression resulting to 1+a
That's a perfectly good way to obtain the correct answer. $\endgroup$