Recurrence Formula for Square Numbers