I realized something today interesting or not, known or unknown, but that tickled my fancy.
The equation we have:
nn + 2d(n - 1) + f - 1
can also be seen as an expanded form of the difference between two arbitrary squares. We can rewrite it as follows:
nn + 2d(n - 1) + f - 1
nn + 2d(n - 1) + (2*d + 1 - e) - 1
nn + 2d*n - e
n(2d + n) - e
Which (when you ignore the e) is the result of the difference between two squares.
I don't think this will be mindblowing, or anything, but it gave me some insight.