A047997
Triangle of numbers a(n,k) = number of balance positions when k equal weights are placed at a k-subset of the points {-n, -(n-1), ..., n-1, n} on a centrally pivoted rod.
Original entry on oeis.org
1, 1, 2, 1, 3, 5, 1, 4, 8, 12, 1, 5, 13, 24, 32, 1, 6, 18, 43, 73, 94, 1, 7, 25, 69, 141, 227, 289, 1, 8, 32, 104, 252, 480, 734, 910, 1, 9, 41, 150, 414, 920, 1656, 2430, 2934, 1, 10, 50, 207, 649, 1636, 3370, 5744, 8150, 9686, 1, 11, 61, 277, 967
Offset: 1
From _Gus Wiseman_, Apr 18 2023: (Start)
Triangle begins:
1
1 2
1 3 5
1 4 8 12
1 5 13 24 32
1 6 18 43 73 94
1 7 25 69 141 227 289
1 8 32 104 252 480 734 910
1 9 41 150 414 920 1656 2430 2934
Row n = 4 counts the following balanced subsets:
{0} {-1,1} {-1,0,1} {-3,0,1,2}
{-2,2} {-2,0,2} {-4,0,1,3}
{-3,3} {-3,0,3} {-2,-1,0,3}
{-4,4} {-3,1,2} {-2,-1,1,2}
{-4,0,4} {-3,-1,0,4}
{-4,1,3} {-3,-1,1,3}
{-2,-1,3} {-3,-2,1,4}
{-3,-1,4} {-3,-2,2,3}
{-4,-1,1,4}
{-4,-1,2,3}
{-4,-2,2,4}
{-4,-3,3,4}
(End)
Last column is a(n,n) =
A002838(n).
A327475 counts subsets with integer mean.
-
a[n_, k_] := Length[ IntegerPartitions[ n*(2k - n + 1)/2, n, Range[2k - n + 1]]]; Flatten[ Table[ a[n, k], {k, 1, 11}, {n, 1, k}]] (* Jean-François Alcover, Jan 02 2012 *)
Table[Length[Select[Subsets[Range[-n,n]],Length[#]==k&&Total[#]==0&]],{n,8},{k,n}] (* Gus Wiseman, Apr 16 2023 *)
A307354
a(n) = Sum_{0<=i<=j<=n} (-1)^(i+j) * (i+j)!/(i!*j!).
Original entry on oeis.org
1, 2, 6, 19, 65, 231, 841, 3110, 11628, 43834, 166298, 634140, 2428336, 9331688, 35967462, 138987715, 538287881, 2088842463, 8119916647, 31613327405, 123251518641, 481125828853, 1880262896537, 7355767408395, 28803717914791, 112887697489907, 442784607413427
Offset: 0
-
Table[Sum[Sum[(-1)^(i + j)*(i + j)!/(i!*j!), {i, 0, j}], {j, 0, n}], {n, 0, 25}] (* Vaclav Kotesovec, Apr 04 2019 *)
-
a(n) = sum(i=0, n, sum(j=i, n, (-1)^(i+j)*(i+j)!/(i!*j!)));
-
a(n) = sum(k=0, n\3, (-1)^k*binomial(2*n-3*k, n)); \\ Seiichi Manyama, Jan 29 2023
-
my(N=30, x='x+O('x^N)); Vec(1/(sqrt(1-4*x)*(1+x^3*(2/(1+sqrt(1-4*x)))^3))) \\ Seiichi Manyama, Jan 29 2023
A337238
Number k such that k and k+1 are both digitally balanced numbers in base 2 (A031443).
Original entry on oeis.org
9, 37, 41, 49, 141, 149, 153, 165, 169, 177, 197, 201, 209, 225, 541, 557, 565, 569, 589, 597, 601, 613, 617, 625, 653, 661, 665, 677, 681, 689, 709, 713, 721, 737, 781, 789, 793, 805, 809, 817, 837, 841, 849, 865, 901, 905, 913, 929, 961, 2109, 2141, 2157, 2165
Offset: 1
9 is a term since the binary representation of 9 is 1001, which contains 2 0's and 2 1's, and the binary representation of 9 + 1 = 10 is 1010, which also contains 2 0's and 2 1's.
-
digBalQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ@(m = Length@d) && Count[d, 1] == m/2]; Select[Range[2000], digBalQ[#] && digBalQ[# + 1] &]
A371964
a(n) is the sum of all symmetric valleys in the set of Catalan words of length n.
Original entry on oeis.org
0, 0, 0, 0, 1, 7, 35, 155, 650, 2652, 10660, 42484, 168454, 665874, 2627130, 10353290, 40775045, 160534895, 631970495, 2487938015, 9795810125, 38576953505, 151957215305, 598732526105, 2359771876175, 9303298456451, 36688955738099, 144732209103699, 571117191135799
Offset: 0
a(4) = 1 because there is 1 Catalan word of length 4 with one symmetric valley: 0101.
a(5) = 7 because there are 7 Catalan words of length 5 with one symmetric valley: 00101, 01001, 01010, 01011, 01012, 01101, and 01212 (see example at p. 16 in Baril et al.).
- Jean-Luc Baril, Pamela E. Harris, Kimberly J. Harry, Matt McClinton, and José L. Ramírez, Enumerating runs, valleys, and peaks in Catalan words, arXiv:2404.05672 [math.CO], 2024. See Corollary 4.7, pp. 16-17.
-
a:= proc(n) option remember; `if`(n<4, 0,
a(n-1)+binomial(2*n-4, n-4))
end:
seq(a(n), n=0..28); # Alois P. Heinz, Apr 15 2024
-
CoefficientList[Series[(1-4x+2x^2-(1-2x)Sqrt[1-4x])/(2(1-x) Sqrt[1-4x]),{x,0,29}],x]
-
from math import comb
def A371964(n): return sum(comb((n-i<<1)-4,n-i-4) for i in range(n-3)) # Chai Wah Wu, Apr 15 2024
A263134
a(n) = Sum_{k=0..n} binomial(3*k+1,k).
Original entry on oeis.org
1, 5, 26, 146, 861, 5229, 32361, 202905, 1284480, 8191380, 52543545, 338641305, 2191124301, 14224347181, 92603307541, 604342068085, 3952451061076, 25898039418496, 169977746765071, 1117287239602471, 7353933943361866, 48461930821297546
Offset: 0
Cf.
A079309: Sum_{k=0..n} binomial(2*k+1,k).
Cf.
A188675: Sum_{k=0..n} binomial(3*k,k).
Cf.
A087413: Sum_{k=0..n} binomial(3*k+2,k).
-
[&+[Binomial(3*k+1,k): k in [0..n]]: n in [0..25]];
-
Table[Sum[Binomial[3 k + 1, k], {k, 0, n}], {n, 0, 25}]
-
makelist(sum(binomial(3*k+1,k),k,0,n),n,0,25);
-
a(n) = sum(k=0, n, binomial(3*k+1,k)) \\ Colin Barker, Oct 16 2015
-
[sum(binomial(3*k+1,k) for k in (0..n)) for n in (0..25)]
A362049
Number of integer partitions of n such that (length) = 2*(median).
Original entry on oeis.org
0, 1, 0, 0, 0, 0, 1, 3, 3, 3, 3, 3, 3, 4, 5, 9, 12, 19, 22, 29, 32, 39, 43, 51, 57, 70, 81, 101, 123, 153, 185, 230, 272, 328, 386, 454, 526, 617, 708, 824, 951, 1106, 1277, 1493, 1727, 2020, 2344, 2733, 3164, 3684, 4245, 4914, 5647, 6502, 7438, 8533, 9730
Offset: 1
The a(13) = 3 through a(15) = 5 partitions:
(7,2,2,2) (8,2,2,2) (9,2,2,2)
(8,2,2,1) (9,2,2,1) (10,2,2,1)
(8,3,1,1) (9,3,1,1) (10,3,1,1)
(3,3,3,3,1,1) (3,3,3,3,2,1)
(4,3,3,3,1,1)
For maximum instead of median we have
A237753.
For minimum instead of median we have
A237757.
These partitions have ranks
A362050.
A000975 counts subsets with integer median.
A307352
a(n) = Sum_{0<=i<=j<=k<=n} (i+j+k)!/(i!*j!*k!).
Original entry on oeis.org
1, 10, 152, 2857, 59258, 1299434, 29540536, 688792297, 16365424655, 394524030964, 9621387028097, 236859068544553, 5876752849424588, 146774130990116924, 3686474939260449666, 93044751867820344115, 2358431594464812420404, 60004708149086107604240
Offset: 0
-
Table[Sum[Sum[Sum[(i+j+k)!/(i!*j!*k!), {i, 0, j}], {j, 0, k}], {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Apr 04 2019 *)
-
{a(n) = sum(i=0, n, sum(j=i, n, sum(k=j, n, (i+j+k)!/(i!*j!*k!))))}
A361800
Number of integer partitions of n with the same length as median.
Original entry on oeis.org
1, 0, 0, 2, 0, 0, 1, 2, 3, 3, 3, 3, 4, 6, 9, 13, 14, 15, 18, 21, 27, 32, 40, 46, 55, 62, 72, 82, 95, 111, 131, 157, 186, 225, 264, 316, 366, 430, 495, 578, 663, 768, 880, 1011, 1151, 1316, 1489, 1690, 1910, 2158, 2432, 2751, 3100, 3505, 3964, 4486, 5079, 5764
Offset: 1
The a(1) = 1 through a(15) = 9 partitions (A=10, B=11):
1 . . 22 . . 331 332 333 433 533 633 733 833 933
31 431 432 532 632 732 832 932 A32
531 631 731 831 931 A31 B31
4441 4442 4443
5441 5442
5531 5532
6441
6531
6621
For minimum instead of median we have
A006141, for twice minimum
A237757.
For maximum instead of median we have
A047993, for twice length
A237753.
For maximum instead of length we have
A053263, for twice median
A361849.
For mean instead of median we have
A206240 (zeros removed).
For minimum instead of length we have
A361860.
A000975 counts subsets with integer median.
A360005 gives twice median of prime indices.
A361850
Number of strict integer partitions of n such that the maximum is twice the median.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 0, 2, 1, 3, 3, 4, 2, 5, 4, 7, 8, 10, 6, 11, 11, 15, 16, 21, 18, 25, 23, 28, 32, 40, 40, 51, 51, 58, 60, 73, 75, 93, 97, 113, 123, 139, 141, 164, 175, 199, 217, 248, 263, 301, 320, 356, 383, 426, 450, 511, 551, 613, 664, 737
Offset: 1
The a(7) = 1 through a(20) = 4 strict partitions (A..C = 10..12):
421 . . 631 632 . 841 842 843 A51 A52 A53 A54 C62
5321 6421 7431 7432 8531 8532 C61 9542
7521 64321 8621 9541 9632
65321 9631 85421
9721
The partition (7,4,3,1) has maximum 7 and median 7/2, so is counted under a(15).
The partition (8,6,2,1) has maximum 8 and median 4, so is counted under a(17).
A000975 counts subsets with integer median.
A359907 counts strict partitions with integer median
Cf.
A027193,
A067659,
A079309,
A111907,
A116608,
A359897,
A359908,
A360952,
A361851,
A361858,
A361859,
A361860.
Original entry on oeis.org
1, 5, 17, 57, 197, 701, 2549, 9413, 35153, 132393, 501905, 1912769, 7321081, 28122281, 108355481, 418590521, 1620751301, 6287963741, 24438234341, 95128761941, 370821819581, 1447337568461, 5655535495901, 22122396951101, 86617604317301, 339438817192805, 1331275883089013
Offset: 0
-
CoefficientList[Series[( -1+4x+2*Sqrt[1-4x])/((1-x)(1-4x)),{x,0,26}],x] (* Stefano Spezia, May 11 2024 *)
Comments