login
A062805
a(n) = Sum_{i=1..n} i*n^(n-i).
8
0, 1, 4, 18, 112, 975, 11196, 160132, 2739136, 54481005, 1234567900, 31384283766, 884241366768, 27342891567355, 920521275490012, 33512287529147400, 1311768467463790336, 54933923640889550745, 2450641333409472928572, 116018436597364068498010
OFFSET
0,3
LINKS
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
Sequence in context: A143920 A233534 A113356 * A326093 A222584 A294469
KEYWORD
nonn,easy
AUTHOR
Olivier Gérard, Jun 23 2001
EXTENSIONS
Prior Mathematica program modified by Harvey P. Dale, Aug 02 2021
STATUS
approved