login
a(n) = n^n - n*(n + 1) / 2.
1

%I #12 Sep 07 2024 20:05:26

%S 1,0,1,21,246,3110,46635,823515,16777180,387420444,9999999945,

%T 285311670545,8916100448178,302875106592162,11112006825557911,

%U 437893890380859255,18446744073709551480,827240261886336764024,39346408075296537575253,1978419655660313589123789,104857599999999999999999790

%N a(n) = n^n - n*(n + 1) / 2.

%F a(n) = Product_{j=1..n} n - Sum_{j=1..n} j.

%F a(n) = A000312(n) - A000217(n).

%t Join[{1},Table[n^n-(n(n+1))/2,{n,20}]] (* _Harvey P. Dale_, Sep 07 2024 *)

%o (Python)

%o def A344919(n):

%o return (n**n)-(n*(n+1)//2) # _Karl-Heinz Hofmann_, Jun 19 2021

%Y Cf. A000217, A000312, A036679, A058126.

%K nonn,easy

%O 0,4

%A _Peter Luschny_, Jun 19 2021