Parity of number of divisors Im pretty new here. 

My question showing me an algorithm: 

TRUE_SEQ(A[1...n])

for i &lt;- 1 to n do
 A[i] &lt;- FALSE
for i &lt;- 1 to n do 
 k &lt;- i
 while(k &lt;= n) do
  FLIP(A[k])
  k &lt;- k + i


FLIP(x)

if x = TRUE then
 x &lt;- FALSE
else
 x &lt;- TRUE


Now i need to prove that after we finish TRUE_SEQ, the value of $A[i]$ is TRUE if and only if $i \in N$ is a power of a some natural number. 

We learned about loop recorded sequence (Im not sure if i say it correctly in english)

Any way i would like a hint (and prefer a hint than a solution - as those are my homeworks)

Thank you for the help.
At the end of the algorithm, the value of $A[n]$ is the parity of the number of divisors of $n$ (TRUE means odd parity). The divisors of $n$ come in pairs $i,n/i$. Most of these pairs consist of two distinct values, but if $n$ is a square, then when $i = \sqrt{n}$, both elements are equal. This shows that $A[n]$ is TRUE if and only if $n$ is a square.