Following is an experimental math claim.

We denote $(a,b)=\gcd(a,b)$.

Let $$G(a)=\sum_{i=1}^{a-1}(-1)^i(a,i).$$

Note:

$$ G(a) = \begin{cases} 0, & \text{if $a\equiv 1\pmod4$} \\ \text{odd}, & \text{if $a\equiv 2\pmod4$} \\ 0, & \text{if $a\equiv 3\pmod4$} \\ \text{even}, & \text{if $a\equiv 0\pmod4$.} \end{cases}$$

Can it be shown that for every $a\in\mathbb{Z}_{\ge2}$, $G(a)\ge-1$?

Table

$$\begin{array}{|c |c |} \hline a & G(a) \\ \hline 2 & -1 \\ \hline 3 & 0 \\ \hline 4 &0 \\ \hline 5 &0 \\ \hline 6 &-1 \\ \hline 7 &0 \\ \hline 8 &4 \\ \hline 9 &0 \\ \hline \vdots &\vdots \\ \hline \end{array}$$

source code PARI/GP

```
for(a=1,10000,if(sum(i=1,a-1, (-1)^i*gcd(a, i))<-1,print([a])))
```