Sum of all possible values of $\gcd(a-1,a^2+a+1)$ 
Find the sum of all possible values of
  $$\gcd(a-1,a^2+a+1)$$
  where $a$ is a positive integer.


HINT:
Let $a-1=b\iff a=?$
$$a^2+a+1=(b+1)^2+b+1+1=b^2+3b+3$$
$$(a-1,a^2+a+1)=(b,b^2+3b+3)=(b,3)$$
