OFFSET
0,4
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..380
FORMULA
a(n) ~ n^n*(1/2+(1/2-1/n)*e^(-2)+(1/(2*n)-1)*e^(-1)).
MAPLE
a := n -> ((n-2)^n-2*(n-1)^n+n^n)/2:
seq(a(n), n=0..21);
MATHEMATICA
A281596[n_] := If[n == 0, 0, ((n-2)^n - 2*(n-1)^n + n^n)/2];
Array[A281596, 25, 0] (* Paolo Xausa, Jul 10 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Jan 26 2017
STATUS
approved