login
A344919
a(n) = n^n - n*(n + 1) / 2.
1
1, 0, 1, 21, 246, 3110, 46635, 823515, 16777180, 387420444, 9999999945, 285311670545, 8916100448178, 302875106592162, 11112006825557911, 437893890380859255, 18446744073709551480, 827240261886336764024, 39346408075296537575253, 1978419655660313589123789, 104857599999999999999999790
OFFSET
0,4
FORMULA
a(n) = Product_{j=1..n} n - Sum_{j=1..n} j.
a(n) = A000312(n) - A000217(n).
MATHEMATICA
Join[{1}, Table[n^n-(n(n+1))/2, {n, 20}]] (* Harvey P. Dale, Sep 07 2024 *)
PROG
(Python)
def A344919(n):
return (n**n)-(n*(n+1)//2) # Karl-Heinz Hofmann, Jun 19 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Luschny, Jun 19 2021
STATUS
approved