A058126 a(n) = n^n - n^2 with 0^0=1.
1, 0, 0, 18, 240, 3100, 46620, 823494, 16777152, 387420408, 9999999900, 285311670490, 8916100448112, 302875106592084, 11112006825557820, 437893890380859150, 18446744073709551360
Offset: 0
Examples
a(2) = 2^2 - 2^2 = 4 - 4 = 0. a(3) = 3^3 - 3^2 = 27 - 9 = 18.
Formula
E.g.f.: 1/(1 + LambertW(-x)) - x*(x + 1)*exp(x), where LambertW() is the Lambert W-function. - Ilya Gutkovskiy, Feb 08 2017