%I #24 Sep 08 2022 08:45:56
%S 1,3,17,142,1593,22461,380713,7526268,169826513,4303999495,
%T 120987654321,3734729768298,125562274081225,4566262891748481,
%U 178581127445062553,7473240118999870456,333189190735802745633,15766036084935301064139
%N a(n) = Sum_{i=0..n} (i+1)*n^i.
%H Bruno Berselli, <a href="/A189001/b189001.txt">Table of n, a(n) for n = 0..300</a>
%F a(n) = ((n^2-2)*n^(n+1)+1)/(n-1)^2 for n > 1; a(0)=1, a(1)=3.
%e a(4) = 1593 because 1593 = 1+2*4+3*4^2+4*4^3+5*4^4.
%t Join[{1, 3}, Table[(((n^2 - 2) n^(n + 1) + 1) / (n - 1)^2), {n, 2, 20}]] (* _Vincenzo Librandi_, Aug 19 2013 *)
%o (Magma) [&+[(k+1)*n^k: k in [0..n]]: n in [0..17]];
%Y Cf. A031973, A051846, A062806.
%Y Cf. A189122: Sum_{i=0..n} (i+1)^2*n^i.
%K nonn
%O 0,2
%A _Bruno Berselli_, Apr 15 2011