OFFSET
0,3
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..100
FORMULA
a(n) = (n^(n+1) - n^2)/(n-1)^2 for n > 1. - Dean Hickerson, Jun 26 2001
EXAMPLE
a(0) = 0*0^0 = 0*1 = 0;
a(1) = 0*1^1 + 1*1^0 = 0 + 1 = 1;
a(2) = 0*2^2 + 1*2^1 + 2*2^0 = 0 + 2 + 2 = 4;
a(3) = 0*3^3 + 1*3^2 + 2*3^1 + 3*3^0 = 0 + 9 + 2*3 + 3*1 = 18.
MATHEMATICA
Table[Sum[i*n^(n-i), {i, n}], {n, 0, 20}] (* Harvey P. Dale, Aug 02 2021 *)
PROG
(PARI) a(n)={if(n>1, (n^(n + 1) - n^2)/(n - 1)^2, n)} \\ Harry J. Smith, Aug 11 2009
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Olivier Gérard, Jun 23 2001
EXTENSIONS
Prior Mathematica program modified by Harvey P. Dale, Aug 02 2021
STATUS
approved