cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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, 108, 133, 120, 147, 147, 176, 161, 192, 192, 225, 208, 243, 243, 280, 261, 300, 300, 341, 320, 363, 363, 408, 385, 432, 432, 481, 456, 507, 507, 560, 533, 588, 588
Offset: 0

Views

Author

Wesley Ivan Hurt, Apr 22 2016

Keywords

Comments

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

Examples

			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.
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.
		

Crossrefs

Programs

  • 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]];
    
  • Maple
    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);
  • Mathematica
    Table[(6n^2-6n+1+(10n-5)(-1)^n-(4n-2-2(-1)^n)(-1)^((2n+1-(-1)^n)/4))/32, {n,0,100}]
    Table[Total@ Flatten[First /@ IntegerPartitions[n, {2}] /. k_ /; EvenQ@ k -> Nothing], {n, 0, 60}] (* Michael De Vlieger, Apr 26 2016, Version 10.2 *)
    f[n_] := Sum[(n - i) Mod[n - i, 2], {i, Floor[n/2]}]; Array[f, 58, 0] (* Robert G. Wilson v, Dec 11 2017 *)
    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 *)
    Table[Total[Select[IntegerPartitions[n,{2}][[All,1]],OddQ]],{n,0,60}] (* Harvey P. Dale, Jun 29 2018 *)
  • PARI
    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
    
  • 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

Formula

a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) - a(n-8) + a(n-9) for n > 8.
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.
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
a(n+1) = A001318(n) - A272104(n+1). - Wesley Ivan Hurt, Apr 22 2016
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
a(n) = Sum_{i=1..floor(n/2)} (n-i) * ((n-i) mod 2). - Wesley Ivan Hurt, Dec 06 2017