Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #38 Sep 08 2022 08:44:58
%S 2,5,13,23,41,62,94,130,180,235,307,385,483,588,716,852,1014,1185,
%T 1385,1595,1837,2090,2378,2678,3016,3367,3759,4165,4615,5080,5592,
%U 6120,6698,7293,7941,8607,9329,10070,10870,11690,12572,13475,14443,15433
%N a(n) = Sum_{k=1..floor(n/2)} T(n, 2k), array T as in A049777.
%C a(n) is coefficient of x^2 in -Product_{j=1..n} (1 + (-1)^j*j*x). - _Robert Israel_, Jun 08 2015
%H Vincenzo Librandi, <a href="/A049779/b049779.txt">Table of n, a(n) for n = 2..1000</a>
%H M. Benoumhani, M. Kolli, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Benoumhani/benoumhani6.html">Finite topologies and partitions</a>, JIS 13 (2010) # 10.3.5, Lemma 6 2nd line.
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-4,1,2,-1).
%F G.f.: x^2*(2+x+x^2)/((1-x)^4*(1+x)^2). Pairwise sums of A023856. - _Ralf Stephan_, May 06 2004
%F a(n) = Sum_{k=1..n} k*floor(k/2). - _Vladeta Jovovic_, Apr 29 2006
%F a(n) = (8*n^3 + 6*n^2 - 2*n - 3 + 3*(-1)^n *(2*n+1))/48. - _Robert Israel_, Jun 08 2015
%F a(n) = (n*(n+1)*(4*n-1) + 6*(-1)^n*floor((n+1)/2))/24. - _Néstor Jofré_, Apr 24 2017
%F E.g.f.: ( (8*x^3 + 30*x^2 + 12*x - 3)*exp(x) + 3*(1-2*x)*exp(-x) )/48. - _G. C. Greubel_, Dec 12 2019
%p seq( (8*n^3 +6*n^2 -2*n -3 +3*(-1)^n*(2*n+1))/48, n=2..50); # _G. C. Greubel_, Dec 12 2019
%t T[m_, n_]:=(m+n)(m-n+1)/2; Table[Sum[T[n, 2k], {k, Floor[n/2]}], {n, 2, 50}] (* _Indranil Ghosh_, Apr 24 2017 *)
%t LinearRecurrence[{2, 1, -4, 1, 2, -1}, {2, 5, 13, 23, 41, 62}, 50] (* _Vincenzo Librandi_, Apr 25 2017 *)
%o (PARI) a(n)=(4*n^3 + 3*n^2 + 2*n - if(n%2,6*n+3))/24 \\ _Charles R Greathouse IV_, Jun 08 2015
%o (MATLAB) a = @(n) 1/4*(n*(n+1)*(4*n-1)/6 + (-1)^n*floor((n+1)/2)); % _Néstor Jofré_, Apr 24 2017
%o (Magma) [n^3/6+n^2/8-n/24-1/16+(-1)^n*(n/8+1/16): n in [2..50]]; // _Vincenzo Librandi_, Apr 25 2017
%o (Sage) [(8*n^3 +6*n^2 -2*n -3 +3*(-1)^n*(2*n+1))/48 for n in (2..50)] # _G. C. Greubel_, Dec 12 2019
%o (GAP) List([2..50], n-> (8*n^3 +6*n^2 -2*n -3 +3*(-1)^n*(2*n+1))/48); # _G. C. Greubel_, Dec 12 2019
%K nonn,easy
%O 2,1
%A _Clark Kimberling_
%E More terms from _Ralf Stephan_, May 06 2004