The possible values of $\gcd(a^2,b^2)+\gcd(a,bc)+\gcd(b,ca)+\gcd(c,ab)$ 
Let $A=\gcd(a^2,b^2)+\gcd(a,bc)+\gcd(b,ca)+\gcd(c,ab)$, where $a$, $b$ and $c$ are positive integers. What are the values that $A$ can take, when $a$, $b$ and $c$ range over all positive integers?

I have no clue how to start. Any kind of help will be appreciated.
Addition:
It is understood that $A\ge4$.
Let $\gcd(a,b)=\gcd(a,c)=\gcd(c,b)=1$; then $A=4$.
But $A\ne5$ for any $a$, $b$ and $c$.
If $a=c=2$ and $b=1$, then $A=\gcd\left(2^2,1^2\right)+\gcd(2,1\times2)+\gcd(1,2\times2)+\gcd(2,2\times1)=1+2+1+2=6$.
But $A\ne7$ for any $a$, $b$ and $c$.

The values that $ A $ can take are exactly the composite positive integers. I first noticed this by writing a computer program checking the value of $ A $ when $ a $, $ b $ and $ c $ are less than $ 30 $. The result looked amazing to me, as the defining expression of $ A $ didn't indicate it in a clear way. So, before I start presenting a proof, I'd like to ask about the source of the problem, and whether there was any motivation behind designing such a problem given somewhere. I want to add that the computer program also helped me find out how to show that every composite positive integer can appear as the value of $ A $ for some $ a $, $ b $ and $ c $.
First, let's show that $ A $ must be composite. To see this, let $ d = \gcd ( a , b ) $, $ a ' = \frac a d $ and $ b ' = \frac b d $, and note that $ \gcd \left ( a ^ 2 , b ^ 2 \right ) = d ^ 2 $, $ \gcd ( a , b c ) = d \gcd ( a ' , c ) $ and $ \gcd ( b , c a ) = d \gcd ( b ' , c ) $. Since $ \gcd ( c , d ) $ divides both $ d $ and $ \gcd ( c , a b ) $, in case $ c $ and $ d $ are not coprime, $ A $ is composite. In case $ c $ and $ d $ are coprime, we get $ \gcd ( c , a b ) = \gcd ( c , a ' b ' ) $, and since $ a ' $ and $ b ' $ are coprime by their definitions, $ \gcd ( c , a b ) = \gcd ( c , a ' ) \gcd ( c , b ' ) $. Then, we will have $ A = \bigl ( d + \gcd ( a ' , c ) \bigr ) \bigl ( d + \gcd ( b ' , c ) \bigr ) $, which shows that $ A $ is composite, as both factors in the last product are greater than $ 1 $.
Now, let's show that for any composite positive integer $ n $, we can choose positive integers $ a $, $ b $ and $ c $ such that $ A = n $. Given $ n $, there are $ m $ and $ k $, both greater than $ 1 $, such that $ n = m k $. Without loss of generality, assume that we have $ m \le k $. Set $ a = m - 1 $, $ b = ( m - 1 ) ( k - m + 1 ) $ and $ c = k - m + 1 $. Then, We have $ \gcd \left ( a ^ 2 , b ^ 2 \right ) = ( m - 1 ) ^ 2 $, $ \gcd ( a , b c ) = m - 1 $, $ \gcd ( b , c a ) = ( m - 1 ) ( k - m + 1 ) $ and $ \gcd ( c , a b ) = k - m + 1 $, which implies $ A = n $.
