login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Sum of the odd numbers among the larger parts of the partitions of n into two parts.
2

%I #52 Nov 16 2024 20:16:52

%S 0,0,1,0,3,3,8,5,12,12,21,16,27,27,40,33,48,48,65,56,75,75,96,85,108,

%T 108,133,120,147,147,176,161,192,192,225,208,243,243,280,261,300,300,

%U 341,320,363,363,408,385,432,432,481,456,507,507,560,533,588,588

%N Sum of the odd numbers among the larger parts of the partitions of n into two parts.

%C Sum of the lengths of the distinct rectangles with odd length and integer width such that L + W = n, W <= L. For example, a(10) = 21; the rectangles are 1 X 9, 3 X 7 and 5 X 5, so 9 + 7 + 5 = 21. - _Wesley Ivan Hurt_, Nov 18 2017

%H Colin Barker, <a href="/A272212/b272212.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>

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

%F a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) - a(n-8) + a(n-9) for n > 8.

%F a(n) = (6*n^2 - 6*n + 1 + (10*n-5)*(-1)^n - (4*n - 2 - 2*(-1)^n)*(-1)^((2*n+1 - (-1)^n)/4))/32.

%F G.f.: x^2*(1 + x + x^2)*(1 - 2*x + 4*x^2 - 2*x^3 + x^4) / ((1-x)^3*(1+x)^2*(1+x^2)^2). - _Colin Barker_, Apr 22 2016

%F a(n+1) = A001318(n) - A272104(n+1). - _Wesley Ivan Hurt_, Apr 22 2016

%F E.g.f.: ((-5*(1 + 2*x))*exp(-x) + (1 + 6*x^2)*exp(x) + 4*(1 + x)*cos(x) + 4*x*sin(x))/32. - _Ilya Gutkovskiy_, Apr 27 2016

%F a(n) = Sum_{i=1..floor(n/2)} (n-i) * ((n-i) mod 2). - _Wesley Ivan Hurt_, Dec 06 2017

%e a(5) = 3; the partitions of 5 into two parts are (4,1),(3,2) and the sum of the odd numbers among the larger parts is 3.

%e a(6) = 8; the partitions of 6 into two parts are (5,1),(4,2),(3,3) and the sum of the odd numbers among the larger parts is 5+3 = 8.

%p A272212:=n->(6*n^2-6*n+1+(10*n-5)*(-1)^n-(4*n-2-2*(-1)^n)*(-1)^((2*n+1-(-1)^n)/4))/32: seq(A272212(n), n=0..100);

%t Table[(6n^2-6n+1+(10n-5)(-1)^n-(4n-2-2(-1)^n)(-1)^((2n+1-(-1)^n)/4))/32, {n,0,100}]

%t Table[Total@ Flatten[First /@ IntegerPartitions[n, {2}] /. k_ /; EvenQ@ k -> Nothing], {n, 0, 60}] (* _Michael De Vlieger_, Apr 26 2016, Version 10.2 *)

%t f[n_] := Sum[(n - i) Mod[n - i, 2], {i, Floor[n/2]}]; Array[f, 58, 0] (* _Robert G. Wilson v_, Dec 11 2017 *)

%t CoefficientList[ Series[x^2 (1 +x +x^2) (1 -2x +4x^2 -2x^3 +x^4)/((1 -x)^3 (1 +x)^2 (1 +x^2)^2), {x, 0, 57}], x] (* _Robert G. Wilson v_, Dec 13 2017 *)

%t Table[Total[Select[IntegerPartitions[n,{2}][[All,1]],OddQ]],{n,0,60}] (* _Harvey P. Dale_, Jun 29 2018 *)

%o (Magma) [(6*n^2-6*n+1+(10*n-5)*(-1)^n-(4*n-2-2*(-1)^n)*(-1)^((2*n+1-(-1)^n) div 4))/32: n in [0..100]];

%o (PARI)

%o concat(vector(2), Vec(x^2*(1+x+x^2)*(1-2*x+4*x^2-2*x^3+x^4)/((1-x)^3*(1+x)^2*(1+x^2)^2) + O(x^50))) \\ _Colin Barker_, Apr 23 2016

%o (PARI) a(n)=([0,1,0,0,0,0,0,0,0; 0,0,1,0,0,0,0,0,0; 0,0,0,1,0,0,0,0,0; 0,0,0,0,1,0,0,0,0; 0,0,0,0,0,1,0,0,0; 0,0,0,0,0,0,1,0,0; 0,0,0,0,0,0,0,1,0; 0,0,0,0,0,0,0,0,1; 1,-1,0,0,-2,2,0,0,1]^n*[0;0;1;0;3;3;8;5;12])[1,1] \\ _Charles R Greathouse IV_, Apr 29 2016

%Y Cf. A001318, A272104.

%K nonn,easy

%O 0,5

%A _Wesley Ivan Hurt_, Apr 22 2016