Find the \$\left(n^2\right)^\text{th }n\$-gonal number
Wolfram Language (Mathematica), 19 bytes

#(4-#-2#^2+#^3)#/2&amp;


Try it online!

Just a golfy version of the second formula.

With PolygonalNumber built-in, 23 bytes

PolygonalNumber[#,#^2]&amp;


Try it online!

As expected, the Mathematica built-in is longer than the golfed version.