login
a(n) = 1*(n+3-1) + 2*(n+3-2) + .... + k*(n+3-k), where k=floor((n+1)/2).
6

%I #44 Sep 08 2022 08:44:47

%S 3,4,13,16,34,40,70,80,125,140,203,224,308,336,444,480,615,660,825,

%T 880,1078,1144,1378,1456,1729,1820,2135,2240,2600,2720,3128,3264,3723,

%U 3876,4389,4560,5130,5320,5950,6160,6853,7084,7843,8096,8924,9200,10100,10400,11375,11700

%N a(n) = 1*(n+3-1) + 2*(n+3-2) + .... + k*(n+3-k), where k=floor((n+1)/2).

%H G. C. Greubel, <a href="/A023857/b023857.txt">Table of n, a(n) for n = 1..1000</a>

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

%F a(n) = Sum_{i=1..ceiling(n/2)} i*(n-i+3) = -ceiling(n/2)*(ceiling(n/2)+1)*(2*ceiling(n/2) - 3*n - 8)/6. - _Wesley Ivan Hurt_, Sep 20 2013

%F G.f. x*(3+x) / ( (1+x)^3*(1-x)^4 ). - _R. J. Mathar_, Sep 25 2013

%F a(n) = 3*A058187(n-1) + A058187(n-2). - _R. J. Mathar_, Sep 25 2013

%F a(n) = (4*n^3 + 27*n^2 + 50*n + 21 - 3*(n^2 + 6*n + 7)*(-1)^n)/48. - _Luce ETIENNE_, Nov 21 2014

%F E.g.f.: (x*(51 + 18*x + 2*x^2)*cosh(x) + (21 + 30*x + 21*x^2 + 2*x^3)*sinh(x))/24. - _G. C. Greubel_, Jun 12 2019

%p seq(sum(i*(n-i+3), i=1..ceil(n/2)), n=1..60); # _Wesley Ivan Hurt_, Sep 20 2013

%t Table[-Ceiling[n/2]*(Ceiling[n/2]+1)*(2*Ceiling[n/2]-3n-8)/6, {n,60}] (* _Wesley Ivan Hurt_, Sep 20 2013 *)

%t LinearRecurrence[{1,3,-3,-3,3,1,-1},{3,4,13,16,34,40,70},60] (* _Harvey P. Dale_, Feb 13 2018 *)

%o (PARI) a(n) = (4*n^3 +27*n^2 +50*n +21 -3*(n^2+6*n+7)*(-1)^n)/48; \\ _G. C. Greubel_, Jun 12 2019

%o (Magma) [(4*n^3 +27*n^2 +50*n +21 -3*(n^2+6*n+7)*(-1)^n)/48: n in [1..60]]; // _G. C. Greubel_, Jun 12 2019

%o (Sage) [(4*n^3 +27*n^2 +50*n +21 -3*(n^2+6*n+7)*(-1)^n)/48 for n in (1..60)] # _G. C. Greubel_, Jun 12 2019

%o (GAP) List([1..60], n-> (4*n^3 +27*n^2 +50*n +21 -3*(n^2+6*n+7)*(-1)^n)/48) # _G. C. Greubel_, Jun 12 2019

%Y Cf. A023855, A023856, A024305, A024854.

%K nonn,easy

%O 1,1

%A _Clark Kimberling_

%E Title simplified by _Sean A. Irvine_, Jun 12 2019