How each term number of square can be found