Given positive integer n, consider the set of numbers {n²+1, n²+2, ... (n+1)²}. If we pick two numbers x and y out of that set, how many different values can the product xy take?

The formula should work for n=1; the set is {2,3,4} and there are three possible products (6, 8, and 12).

(And it seems reasonable that for n=0, it should produce zero, since there would be no possible products.)