Change test bounds to 2*n instead of n^2