A272104 Sum of the even numbers among the larger parts of the partitions of n into two parts.
0, 0, 0, 2, 2, 4, 4, 10, 10, 14, 14, 24, 24, 30, 30, 44, 44, 52, 52, 70, 70, 80, 80, 102, 102, 114, 114, 140, 140, 154, 154, 184, 184, 200, 200, 234, 234, 252, 252, 290, 290, 310, 310, 352, 352, 374, 374, 420, 420, 444, 444, 494, 494, 520, 520, 574, 574, 602
Offset: 0
Examples
a(5) = 4; the partitions of 5 into 2 parts are (4,1),(3,2) and the sum of the larger even parts is 4. a(6) = 4; the partitions of 6 into 2 parts are (5,1),(4,2),(3,3) and the sum of the larger even parts is also 4.
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for sequences related to partitions
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,2,-2,0,0,-1,1).
Crossrefs
Programs
-
Magma
[(1+3*(2*n-3-(-1)^n)/2+3*(2*n-3-(-1)^n)^2/8+(2*n-1-(-1)^n)*(-1)^((2*n+1-(-1)^n) div 4)/2)/8 : n in [0..50]];
-
Maple
A272104:=n->(1+3*(2*n-3-(-1)^n)/2+3*(2*n-3-(-1)^n)^2/8+(2*n-1-(-1)^n)*(-1)^((2*n+1-(-1)^n)/4)/2)/8: seq(A272104(n), n=0..100);
-
Mathematica
Table[(1 + 3(2n-3-(-1)^n)/2 + 3(2n-3-(-1)^n)^2/8 + (2n-1-(-1)^n) * (-1)^((2n+1-(-1)^n)/4)/2) / 8, {n, 0, 50}] Table[Total@ Map[First, IntegerPartitions[n, {2}] /. {k_, } /; OddQ@ k -> Nothing], {n, 0, 57}] (* _Michael De Vlieger, Apr 20 2016, Version 10.2 *)
-
PARI
concat(vector(3), Vec(2*x^3*(1-x+x^2)*(1+x+x^2)/((1-x)^3*(1+x)^2*(1+x^2)^2) + O(x^50))) \\ Colin Barker, Apr 20 2016
Formula
a(n) = (1 + 3*(2n-3-(-1)^n)/2 + 3*(2n-3-(-1)^n)^2/8 + (2n-1-(-1)^n) * (-1)^((2n+1-(-1)^n)/4)/2) / 8.
a(n) = Sum_{i=ceiling(n/2)..n-1} i * (i+1 mod 2).
a(n) = Sum_{i=1..floor(n/2)} (n-i) * (n-i+1 mod 2).
G.f.: 2*x^3*(1-x+x^2)*(1+x+x^2) / ((1-x)^3*(1+x)^2*(1+x^2)^2). - Colin Barker, Apr 20 2016
From Wesley Ivan Hurt, Apr 22 2016, Apr 23 2016: (Start)
a(12n) = 2*A268351(n).
E.g.f.: ((2 + 3*x*(1 + x))*cosh(x) - 2*(cos(x) + x*cos(x) + x*sin(x)) + (-1 + 3*(-1 + x)*x)*sinh(x))/16. - Ilya Gutkovskiy, Apr 29 2016
Comments