OFFSET
0,5
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..500
FORMULA
a(n) = Sum_{k=1..n-2} k^(n-k-2)*binomial(n-k, 2).
a(n) = Sum_{k=0..n-1} (n-k)^(k-2)*binomial(k, 2). - G. C. Greubel, May 15 2021
MAPLE
A081197 := proc(n)
add(k^(n-k-2)*binomial(n-k, 2), k=1..n-2) ;
end proc: # R. J. Mathar, Feb 13 2015
MATHEMATICA
Table[Sum[k^(n-k-2)*Binomial[n-k, 2], {k, n-2}], {n, 0, 30}] (* G. C. Greubel, May 15 2021 *)
PROG
(Magma) [n lt 3 select 0 else (&+[j^(n-j-2)*Binomial(n-j, 2): j in [1..n-2]]): n in [0..30]]; // G. C. Greubel, May 15 2021
(Sage) [sum( (n-k)^(k-2)*binomial(k, 2) for k in (0..n-1) ) for n in (0..30)] # G. C. Greubel, May 15 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Mar 11 2003
EXTENSIONS
Terms corrected by G. C. Greubel, May 15 2021
STATUS
approved