Im pretty new here.
My question showing me an algorithm:
for i <- 1 to n do A[i] <- FALSE for i <- 1 to n do k <- i while(k <= n) do FLIP(A[k]) k <- k + i
if x = TRUE then x <- FALSE else x <- 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.