login
a(n) = n*(n^2 - 4*n + 5)/2.
6

%I #25 Mar 30 2023 12:14:27

%S 0,1,1,3,10,25,51,91,148,225,325,451,606,793,1015,1275,1576,1921,2313,

%T 2755,3250,3801,4411,5083,5820,6625,7501,8451,9478,10585,11775,13051,

%U 14416,15873,17425,19075,20826,22681,24643,26715,28900,31201,33621

%N a(n) = n*(n^2 - 4*n + 5)/2.

%C Positive values are the row sums of triangle A159798.

%H Vincenzo Librandi, <a href="/A162607/b162607.txt">Table of n, a(n) for n = 0..1000</a>

%H Amit Kumar Singh, Akash Kumar and Thambipillai Srikanthan, <a href="http://www.ece.nus.edu.sg/stfpage/eleak/pdf/akumar_todaes_2012.pdf">Accelerating Throughput-aware Run-time Mapping for Heterogeneous MPSoCs</a>, ACM Transactions on Design Automation of Electronic Systems, 2012. - From _N. J. A. Sloane_, Dec 25 2012

%H <a href="/index/Pol#polygonal_numbers">Index to sequences related to polygonal numbers</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1)

%F G.f.: x*(1 - 3*x + 5*x^2)/(1 - x)^4. - _Vincenzo Librandi_, Dec 19 2012

%F a(n) = A057145(n-1,n) = A072277(n-1). - _R. J. Mathar_, Jul 28 2016

%F E.g.f.: x*(x^2 - x + 2)*exp(x)/2. - _G. C. Greubel_, Apr 21 2018

%t f[n_]:=(n^3-n^2)/2+1; Table[f[n],{n,-1,5!}] (* _Vladimir Joseph Stephan Orlovsky_, Feb 07 2010 *)

%t CoefficientList[Series[x*(1 - 3*x + 5*x^2)/(1 - x)^4, {x, 0, 50}], x] (* _Vincenzo Librandi_, Dec 19 2012 *)

%o (Magma) [n*(n^2 - 4*n + 5)/2: n in [0..50]]; // _Vincenzo Librandi_, Dec 19 2012

%o (PARI) for(n=0,50, print1(n*(n^2-4*n+5)/2, ", ")) \\ _G. C. Greubel_, Apr 21 2018

%Y Cf. A159798.

%K nonn,easy

%O 0,4

%A _R. J. Mathar_ and _Omar E. Pol_, Jul 21 2009