there are $\displaystyle 100$ ties numbered from $\displaystyle 1-100$. all ties numbered with a square are taken out. the remaining ties are renumbered from $\displaystyle 1$ onwards. again all ties numbered with square numbers are taken out. the remaining tie are renumbered again $\displaystyle 1 $ onwards. find a general formula for $\displaystyle n^2$ number of ties for how many times square numbered ties were taken out till only a tie numbered $\displaystyle 1$ remained