Displaying 1-10 of 13 results found.
Number of compositions of n with equal number of even and odd parts.
+10
16
1, 0, 0, 2, 0, 4, 6, 6, 24, 28, 60, 130, 190, 432, 770, 1386, 2856, 5056, 9828, 18918, 34908, 68132, 128502, 244090, 470646, 890628, 1709136, 3271866, 6238986, 11986288, 22925630, 43932906, 84349336, 161625288, 310404768, 596009494
FORMULA
a(n) = Sum_{k=floor(n/3)..floor(n/2)} C(2*n-4*k,n-2*k)*C(n-1-k,2*n-4*k-1).
Recurrence: n*(2*n-7)*a(n) = 2*(n-2)*(2*n-5)*a(n-2) + 2*(2*n-7)*(2*n-3)*a(n-3) - (n-4)*(2*n-3)*a(n-4). - Vaclav Kotesovec, May 01 2014
a(n) ~ sqrt(c) * d^n / sqrt(Pi*n), where d = 1.94696532812840456026081823863... is the root of the equation 1-4*d-2*d^2+d^4 = 0, c = 0.225563290820392765554898545739... is the root of the equation 43*c^4-18*c^2+8*c-1=0. - Vaclav Kotesovec, May 01 2014
EXAMPLE
The a(0) = 1 through a(7) = 6 compositions (empty columns indicated by dots):
() . . (12) . (14) (1122) (16)
(21) (23) (1212) (25)
(32) (1221) (34)
(41) (2112) (43)
(2121) (52)
(2211) (61)
(End)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Count[#, _?EvenQ]==Count[#, _?OddQ]&]], {n, 0, 15}] (* Gus Wiseman, Jun 26 2022 *)
CROSSREFS
These compositions are ranked by A355321.
Number T(n,k) of compositions of n, where k is the difference between the number of odd parts and the number of even parts, both counted without multiplicity; triangle T(n,k), n>=0, read by rows.
+10
13
1, 1, 1, 0, 1, 2, 2, 2, 3, 1, 2, 11, 2, 3, 2, 2, 14, 8, 6, 6, 33, 14, 11, 5, 15, 43, 45, 20, 44, 82, 99, 25, 6, 14, 74, 141, 230, 41, 12, 202, 260, 451, 85, 26, 6, 22, 351, 514, 953, 148, 54, 24, 766, 1049, 1798, 355, 104, 18, 104, 1301, 2321, 3503, 751, 194
COMMENTS
T(n^2,n) = T(n^2+n,-n) = n! = A000142(n) for n>=0.
EXAMPLE
T(8,-1) = 15: [2,2,2,2], [1,1,2,4], [1,1,4,2], [1,2,1,4], [1,2,4,1], [1,4,1,2], [1,4,2,1], [2,1,1,4], [2,1,4,1], [2,4,1,1], [4,1,1,2], [4,1,2,1], [4,2,1,1], [4,4], [8].
Triangle T(n,k) begins:
: n\k : -3 -2 -1 0 1 2 3 ...
+-----+------------------------------------
: 0 : 1;
: 1 : 1;
: 2 : 1, 0, 1;
: 3 : 2, 2;
: 4 : 2, 3, 1, 2;
: 5 : 11, 2, 3;
: 6 : 2, 2, 14, 8, 6;
: 7 : 6, 33, 14, 11;
: 8 : 5, 15, 43, 45, 20;
: 9 : 44, 82, 99, 25, 6;
: 10 : 14, 74, 141, 230, 41, 12;
: 11 : 202, 260, 451, 85, 26;
: 12 : 6, 22, 351, 514, 953, 148, 54;
: 13 : 24, 766, 1049, 1798, 355, 104;
: 14 : 18, 104, 1301, 2321, 3503, 751, 194;
MAPLE
b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
expand(add(`if`(j=0, 1, x^(2*irem(i, 2)-1))*
b(n-i*j, i-1, p+j)/j!, j=0..n/i))))
end:
T:= n->(p->seq(coeff(p, x, i), i=ldegree(p)..degree(p)))(b(n$2, 0)):
seq(T(n), n=0..20);
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[n==0, p!, If[i<1, 0, Expand[Sum[If[j==0, 1, x^(2*Mod[i, 2]-1)]*b[n-i*j, i-1, p+j]/j!, {j, 0, n/i}]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, Exponent[p, x, Min], Exponent[p, x]}]][b[n, n, 0]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, Jan 17 2017, translated from Maple *)
CROSSREFS
Columns k=(-5)-5 give: A242836, A242837, A242838, A242839, A242840, A242821, A242841, A242842, A242843, A242844, A242845.
Cf. A242498 (compositions with multiplicity), A242618 (partitions without multiplicity).
Number of compositions of n, where the difference between the number of odd parts and the number of even parts is 1.
+10
2
1, 0, 1, 3, 1, 9, 11, 18, 51, 65, 151, 290, 477, 1043, 1835, 3486, 6931, 12540, 24607, 46797, 87979, 171072, 323269, 619245, 1190619, 2264925, 4357211, 8343322, 15973309, 30711853, 58846191, 113027716, 217192103, 416964202, 801880039, 1541412015, 2963997227
COMMENTS
With offset 2 number of compositions of n, where the difference between the number of odd parts and the number of even parts is -1.
FORMULA
Recurrence (for n>=5): (n+2)*(16*n^4 - 128*n^3 + 344*n^2 - 352*n + 89)*a(n) = -32*(n+1)*(2*n-5)*a(n-1) + 2*(16*n^5 - 112*n^4 + 264*n^3 - 320*n^2 + 301*n - 89)*a(n-2) + 2*(2*n-5)*(16*n^4 - 80*n^3 + 80*n^2 + 36*n - 53)*a(n-3) - (n-4)*(16*n^4 - 64*n^3 + 56*n^2 + 16*n - 31)*a(n-4). - Vaclav Kotesovec, May 20 2014
MAPLE
a:= proc(n) option remember;
`if`(n<6, [0, 1, 0, 1, 3, 1][n+1],
((3*n-2)*a(n-2) +(4*n+2)*a(n-3) -(3*n-10)*a(n-4)
-(4*n-22)*a(n-5) +(n-6)*a(n-6))/(n+2))
end:
seq(a(n), n=1..50);
MATHEMATICA
a[n_] := a[n] = If[n<6, {0, 1, 0, 1, 3, 1}[[n+1]], ((3n-2)a[n-2] + (4n+2)a[n-3] - (3n-10)a[n-4] - (4n-22)a[n-5] + (n-6)a[n-6])/(n+2)];
Number of compositions of n, where the difference between the number of odd parts and the number of even parts is 2.
+10
2
1, 0, 2, 4, 3, 16, 19, 40, 95, 136, 321, 588, 1057, 2240, 3998, 7848, 15339, 28464, 56143, 106788, 204083, 396704, 755052, 1457456, 2806531, 5377112, 10382243, 19947252, 38382957, 73996576, 142311198, 274283168, 528438319, 1017784016, 1962451118, 3781912684
COMMENTS
With offset 4 number of compositions of n, where the difference between the number of odd parts and the number of even parts is -2.
FORMULA
Recurrence (for n>=6): (n+4)*(2*n-5)*(2*n-3)*(n^4 - 6*n^3 + 11*n^2 - 6*n - 16)*a(n) = -16*(n-3)*(n+3)*(2*n-5)*(2*n-1)*a(n-1) + 2*(n-2)*(2*n-3)*(2*n^5 - 7*n^4 + 8*n^3 - 51*n^2 + 28*n + 32)*a(n-2) + 2*(n-3)*(2*n-5)*(2*n-1)*(2*n^4 - 3*n^3 - 2*n^2 + 11*n - 24)*a(n-3) - (n-4)*(2*n-3)*(2*n-1)*(n^4 - 2*n^3 - n^2 + 2*n - 16)*a(n-4). - Vaclav Kotesovec, May 20 2014
Number of compositions of n, where the difference between the number of odd parts and the number of even parts is 3.
+10
2
1, 0, 3, 5, 6, 25, 31, 75, 162, 259, 609, 1106, 2122, 4410, 8076, 16197, 31527, 59961, 118844, 227700, 441507, 860860, 1654731, 3218501, 6226818, 12027405, 23337471, 45082050, 87258876, 168935018, 326536646, 632132760, 1222716653, 2364969824, 4576680195
COMMENTS
With offset 6 number of compositions of n, where the difference between the number of odd parts and the number of even parts is -3.
FORMULA
Recurrence (for n>=7): (n-3)*(n-2)*(n-1)*(n+6)*(16*n^4 - 64*n^3 + 56*n^2 + 16*n - 1311)*a(n) = -288*(n-4)*(n-2)*n*(n+5)*(2*n-3)*a(n-1) + 2*(n-1)*(16*n^7 - 64*n^6 + 136*n^5 - 1048*n^4 + 1621*n^3 + 1202*n^2 - 9162*n + 7866)*a(n-2) + 2*(n-2)*n*(2*n-3)*(16*n^5 - 32*n^4 - 48*n^3 + 212*n^2 - 1429*n + 2145)*a(n-3) - (n-4)*(n-1)^2*n*(16*n^4 - 40*n^2 - 1287)*a(n-4). - Vaclav Kotesovec, May 20 2014
Number of compositions of n, where the difference between the number of odd parts and the number of even parts is 4.
+10
2
1, 0, 4, 6, 10, 36, 48, 126, 259, 456, 1064, 1956, 3939, 8112, 15300, 31174, 60951, 118580, 236456, 458172, 900185, 1765556, 3431792, 6728410, 13107393, 25538448, 49856392, 96966572, 188914574, 367741688, 715053048, 1391512424, 2705016795, 5258241032
COMMENTS
With offset 8 number of compositions of n, where the difference between the number of odd parts and the number of even parts is -4.
FORMULA
Recurrence (for n>=8): (n-4)*(n+8)*(2*n-3)*(2*n-1)*(n^4 - 2*n^3 - n^2 + 2*n - 256)*a(n) = -64*(n-5)*(n-1)*(n+7)*(2*n-3)*(2*n+1)*a(n-1) + 2*(2*n-1)*(2*n^7 - n^6 + 14*n^5 - 199*n^4 - 288*n^3 + 600*n^2 - 5360*n + 2928)*a(n-2) + 2*(n-1)*(2*n-3)*(2*n+1)*(2*n^5 + n^4 - 9*n^3 + 28*n^2 - 508*n + 608)*a(n-3) - (n-4)*n*(2*n-1)*(2*n+1)*(n^4 + 2*n^3 - n^2 - 2*n - 256)*a(n-4). - Vaclav Kotesovec, May 20 2014
Number of compositions of n, where the difference between the number of odd parts and the number of even parts is 5.
+10
2
1, 0, 5, 7, 15, 49, 71, 196, 394, 753, 1746, 3285, 6865, 14124, 27445, 56661, 111892, 222222, 446524, 876876, 1744353, 3448783, 6782633, 13411528, 26346074, 51799306, 101840098, 199601828, 391637976, 767247094, 1501758784, 2939789022, 5747749147, 11235696151
COMMENTS
With offset 10 number of compositions of n, where the difference between the number of odd parts and the number of even parts is -5.
FORMULA
Recurrence (for n>=9): (n-5)*(n-1)*n*(n+10)*(16*n^4 - 40*n^2 - 9991)*a(n) = -800*(n-6)*(n-1)*(n+1)*(n+9)*(2*n-1)*a(n-1) + 2*n*(16*n^7 + 48*n^6 + 280*n^5 - 1920*n^4 - 11691*n^3 - 5023*n^2 - 167795*n + 7975)*a(n-2) + 2*(n-1)*(n+1)*(2*n-1)*(16*n^5 + 48*n^4 - 16*n^3 + 292*n^2 - 9645*n + 7200)*a(n-3) - (n-4)*n*(n+1)^2*(16*n^4 + 64*n^3 + 56*n^2 - 16*n - 10015)*a(n-4). - Vaclav Kotesovec, May 20 2014
Number of compositions of n, where the difference between the number of odd parts and the number of even parts is 6.
+10
2
1, 0, 6, 8, 21, 64, 101, 288, 576, 1180, 2727, 5280, 11363, 23496, 46981, 98176, 196482, 397644, 806351, 1606488, 3234335, 6456048, 12849330, 25637632, 50835950, 100883304, 199903578, 395067760, 781029504, 1540973568, 3037666097, 5984978112, 11775884581
COMMENTS
With offset 12 number of compositions of n, where the difference between the number of odd parts and the number of even parts is -6.
FORMULA
Recurrence (for n>=10): (n-6)*(n+12)*(2*n-1)*(2*n+1)*(n^4 + 2*n^3 - n^2 - 2*n - 1296)*a(n) = -144*(n-7)*n*(n+11)*(2*n-1)*(2*n+3)*a(n-1) + 2*(2*n+1)*(2*n^7 + 13*n^6 + 80*n^5 - 179*n^4 - 3424*n^3 - 6476*n^2 - 69072*n - 31104)*a(n-2) + 2*n*(2*n-1)*(2*n+3)*(2*n^5 + 11*n^4 + 15*n^3 + 67*n^2 - 2465*n + 642)*a(n-3) - (n-4)*(n+2)*(2*n+1)*(2*n+3)*(n^4 + 6*n^3 + 11*n^2 + 6*n - 1296)*a(n-4). - Vaclav Kotesovec, May 20 2014
Number of compositions of n, where the difference between the number of odd parts and the number of even parts is 7.
+10
2
1, 0, 7, 9, 28, 81, 139, 405, 815, 1771, 4092, 8173, 18019, 37609, 77246, 163345, 331968, 683631, 1400777, 2832362, 5770056, 11640546, 23446366, 47227530, 94582628, 189487950, 378658714, 754877809, 1504215522, 2990469337, 5939101301, 11782590061, 23340439078
COMMENTS
With offset 14 number of compositions of n, where the difference between the number of odd parts and the number of even parts is -7.
FORMULA
Recurrence (for n>=11): (n-7)*n*(n+1)*(n+14)*(16*n^4 + 64*n^3 + 56*n^2 - 16*n - 38431)*a(n) = -1568*(n-8)*n*(n+2)*(n+13)*(2*n+1)*a(n-1) + 2*(n+1)*(16*n^7 + 160*n^6 + 1192*n^5 + 472*n^4 - 49083*n^3 - 168912*n^2 - 1534048*n - 1379196)*a(n-2) + 2*n*(n+2)*(2*n+1)*(16*n^5 + 128*n^4 + 336*n^3 + 1076*n^2 - 36101*n - 8729)*a(n-3) - (n-4)*(n+1)*(n+2)*(n+3)*(16*n^4 + 128*n^3 + 344*n^2 + 352*n - 38311)*a(n-4). - Vaclav Kotesovec, May 20 2014
Number of compositions of n, where the difference between the number of odd parts and the number of even parts is 8.
+10
2
1, 0, 8, 10, 36, 100, 186, 550, 1122, 2564, 5940, 12246, 27560, 58240, 122642, 262458, 542243, 1134944, 2352136, 4826980, 9949352, 20300312, 41377116, 84172508, 170322099, 344527304, 694617960, 1397219682, 2807142612, 5625453196, 11258808682, 22498804286
COMMENTS
With offset 16 number of compositions of n, where the difference between the number of odd parts and the number of even parts is -8.
FORMULA
Recurrence (for n>=12): (n-8)*(n+16)*(2*n+1)*(2*n+3)*(n^4 + 6*n^3 + 11*n^2 + 6*n - 4096)*a(n) = -256*(n-9)*(n+1)*(n+15)*(2*n+1)*(2*n+5)*a(n-1) + 2*(2*n+3)*(2*n^7 + 27*n^6 + 242*n^5 + 549*n^4 - 9408*n^3 - 49916*n^2 - 462064*n - 606208)*a(n-2) + 2*(n+1)*(2*n+1)*(2*n+5)*(2*n^5 + 21*n^4 + 79*n^3 + 254*n^2 - 7608*n - 5760)*a(n-3) - (n-4)*(n+4)*(2*n+3)*(2*n+5)*(n^4 + 10*n^3 + 35*n^2 + 50*n - 4072)*a(n-4). - Vaclav Kotesovec, May 20 2014
Search completed in 0.010 seconds
|