I agree with Rich that maybe the
first differences seem easier to attack, but this might be deceptive... this
is asking how many of {n,2n,3n,...,n^2} are not ij for i,j<n, and doing
this based on the factorization of n means recognizing things like "No, 34*16
isn't new for n=34, because it already appeared as 32*17." Maybe for each
n you can look at its prime factorization and calculate one list of likely
factor swaps to look out for? Ugh.