A218698
Number T(n,k) of ways to divide the partitions of n into nonempty consecutive subsequences each of which contains only equal parts and parts from distinct subsequences differ by at least k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
Original entry on oeis.org
1, 1, 1, 3, 2, 2, 6, 3, 2, 2, 14, 5, 4, 3, 3, 27, 7, 4, 3, 2, 2, 60, 11, 8, 6, 5, 4, 4, 117, 15, 8, 6, 4, 3, 2, 2, 246, 22, 13, 9, 8, 6, 5, 4, 4, 490, 30, 15, 12, 8, 7, 5, 4, 3, 3, 1002, 42, 22, 14, 12, 9, 8, 6, 5, 4, 4, 1998, 56, 24, 16, 12, 10, 7, 6, 4, 3, 2, 2
Offset: 0
T(4,0) = 14: [[1],[1],[1],[1]], [[1,1],[1],[1]], [[1],[1,1],[1]], [[1,1,1],[1]], [[1],[1],[1,1]], [[1,1],[1,1]], [[1],[1,1,1]], [[1,1,1,1]], [[1],[1],[2]], [[1,1],[2]], [[2],[2]], [[2,2]], [[1],[3]], [[4]].
T(4,1) = 5: [[1,1,1,1]], [[1,1],[2]], [[2,2]], [[1],[3]], [[4]].
T(4,2) = 4: [[1,1,1,1]], [[2,2]], [[1],[3]], [[4]].
T(4,3) = T(4,4) = A000005(4) = 3: [[1,1,1,1]], [[2,2]], [[4]].
Triangle T(n,k) begins:
1;
1, 1;
3, 2, 2;
6, 3, 2, 2;
14, 5, 4, 3, 3;
27, 7, 4, 3, 2, 2;
60, 11, 8, 6, 5, 4, 4;
117, 15, 8, 6, 4, 3, 2, 2;
...
Columns k=0-10 give:
A006951,
A000041,
A116931,
A116932,
A218699,
A218700,
A218701,
A218702,
A218703,
A218704,
A218705.
-
b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1, k) +add(b(n-i*j, i-k, k), j=1..n/i)))
end:
T:= (n, k)-> b(n, n, k):
seq(seq(T(n,k), k=0..n), n=0..12);
-
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, b[n, i - 1, k] + Sum[b[n - i*j, i - k, k], {j, 1, n/i}]]]; T[n_, k_] := b[n, n, k]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 27 2013, translated from Maple *)
A336131
Number of ways to split an integer partition of n into contiguous subsequences all having different sums.
Original entry on oeis.org
1, 1, 2, 6, 9, 20, 44, 74, 123, 231, 441, 681, 1188, 1889, 3110, 5448, 8310, 13046
Offset: 0
The a(1) = 1 through a(4) = 9 splits:
(1) (2) (3) (4)
(1,1) (2,1) (2,2)
(1,1,1) (3,1)
(2),(1) (2,1,1)
(1),(1,1) (3),(1)
(1,1),(1) (1,1,1,1)
(2,1),(1)
(1),(1,1,1)
(1,1,1),(1)
The version with equal instead of different sums is
A317715.
Starting with a composition gives
A336127.
Starting with a strict composition gives
A336128.
Starting with a strict partition gives
A336132.
Partitions of partitions are
A001970.
Partitions of compositions are
A075900.
Compositions of compositions are
A133494.
Compositions of partitions are
A323583.
-
splits[dom_]:=Append[Join@@Table[Prepend[#,Take[dom,i]]&/@splits[Drop[dom,i]],{i,Length[dom]-1}],{dom}];
Table[Sum[Length[Select[splits[ctn],UnsameQ@@Total/@#&]],{ctn,IntegerPartitions[n]}],{n,0,10}]
A336134
Number of ways to split an integer partition of n into contiguous subsequences with strictly increasing sums.
Original entry on oeis.org
1, 1, 2, 4, 6, 11, 17, 27, 37, 62, 82, 125, 168, 246, 320, 462, 585, 839, 1078, 1466, 1830, 2528, 3136, 4188, 5210, 6907, 8498, 11177, 13570, 17668, 21614, 27580, 33339, 42817, 51469, 65083, 78457, 98409, 117602, 147106, 174663, 217400, 259318, 319076, 377707
Offset: 0
The a(1) = 1 through a(6) = 17 splits:
(1) (2) (3) (4) (5) (6)
(1,1) (2,1) (2,2) (3,2) (3,3)
(1,1,1) (3,1) (4,1) (4,2)
(1),(1,1) (2,1,1) (2,2,1) (5,1)
(1,1,1,1) (3,1,1) (2,2,2)
(1),(1,1,1) (2,1,1,1) (3,2,1)
(2),(2,1) (4,1,1)
(1,1,1,1,1) (2,2,1,1)
(2),(1,1,1) (2),(2,2)
(1),(1,1,1,1) (3,1,1,1)
(1,1),(1,1,1) (2,1,1,1,1)
(2),(2,1,1)
(1,1,1,1,1,1)
(2),(1,1,1,1)
(1),(1,1,1,1,1)
(1,1),(1,1,1,1)
(1),(1,1),(1,1,1)
The version with equal sums is
A317715.
The version with strictly decreasing sums is
A336135.
The version with weakly decreasing sums is
A316245.
The version with different sums is
A336131.
Starting with a composition gives
A304961.
Starting with a strict partition gives
A336133.
Partitions of partitions are
A001970.
Partitions of compositions are
A075900.
Compositions of compositions are
A133494.
Compositions of partitions are
A323583.
-
splits[dom_]:=Append[Join@@Table[Prepend[#,Take[dom,i]]&/@splits[Drop[dom,i]],{i,Length[dom]-1}],{dom}];
Table[Sum[Length[Select[splits[ctn],Less@@Total/@#&]],{ctn,IntegerPartitions[n]}],{n,0,10}]
-
a(n)={my(recurse(r,m,s,t,f)=if(m==0, r==0, if(f && r > t && t >= s, self()(r,m,t+1,0,0)) + self()(r,m-1,s,t,0) + self()(r-m,min(m,r-m), s,t+m,1))); recurse(n,n,0,0,0)} \\ Andrew Howroyd, Jan 18 2024
A365044
Number of subsets of {1..n} whose greatest element cannot be written as a (strictly) positive linear combination of the others.
Original entry on oeis.org
1, 2, 3, 5, 9, 20, 43, 96, 207, 442, 925, 1913, 3911, 7947, 16061, 32350, 64995, 130384, 261271, 523194, 1047208, 2095459, 4192212, 8386044, 16774078, 33550622, 67104244, 134212163, 268428760, 536862900, 1073732255, 2147472267, 4294953778, 8589918612, 17179850312
Offset: 0
The subset S = {3,5,6,8} has 6 = 2*3 + 0*5 + 0*8 and 8 = 1*3 + 1*5 + 0*6 but neither of these is strictly positive, so S is counted under a(8).
The a(0) = 1 through a(5) = 20 subsets:
{} {} {} {} {} {}
{1} {1} {1} {1} {1}
{2} {2} {2} {2}
{3} {3} {3}
{2,3} {4} {4}
{2,3} {5}
{3,4} {2,3}
{2,3,4} {2,5}
{1,2,3,4} {3,4}
{3,5}
{4,5}
{2,3,4}
{2,4,5}
{3,4,5}
{1,2,3,4}
{1,2,3,5}
{1,2,4,5}
{1,3,4,5}
{2,3,4,5}
{1,2,3,4,5}
A085489 and
A364755 count subsets w/o the sum of two distinct elements.
A088809 and
A364756 count subsets with the sum of two distinct elements.
A364350 counts combination-free strict partitions, complement
A364839.
A364913 counts combination-full partitions.
Cf.
A006951,
A237113,
A237668,
A308546,
A324736,
A326020,
A326080,
A364272,
A364349,
A364534,
A365069.
-
combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
Table[Length[Select[Subsets[Range[n]],And@@Table[combp[Last[#],Union[Most[#]]]=={},{k,Length[#]}]&]],{n,0,10}]
-
from itertools import combinations
from sympy.utilities.iterables import partitions
def A365044(n):
mlist = tuple({tuple(sorted(p.keys())) for p in partitions(m,k=m-1)} for m in range(1,n+1))
return n+1+sum(1 for k in range(2,n+1) for w in combinations(range(1,n+1),k) if w[:-1] not in mlist[w[-1]-1]) # Chai Wah Wu, Nov 20 2023
A133121
Triangle T(n,k) read by rows = number of partitions of n such that number of parts minus number of distinct parts is equal to k, k = 0..n-1.
Original entry on oeis.org
1, 1, 1, 2, 0, 1, 2, 2, 0, 1, 3, 2, 1, 0, 1, 4, 2, 3, 1, 0, 1, 5, 4, 2, 2, 1, 0, 1, 6, 6, 3, 3, 2, 1, 0, 1, 8, 7, 5, 4, 2, 2, 1, 0, 1, 10, 8, 10, 3, 5, 2, 2, 1, 0, 1, 12, 13, 8, 9, 4, 4, 2, 2, 1, 0, 1, 15, 15, 14, 10, 8, 5, 4, 2, 2, 1, 0, 1, 18, 21, 15, 16, 8, 9, 4, 4, 2, 2, 1, 0, 1, 22, 25, 23, 17, 17, 7, 10, 4, 4, 2, 2, 1, 0, 1
Offset: 1
1
1,1
2,0,1
2,2,0,1
3,2,1,0,1
4,2,3,1,0,1
5,4,2,2,1,0,1
6,6,3,3,2,1,0,1
8,7,5,4,2,2,1,0,1
10,8,10,3,5,2,2,1,0,1
12,13,8,9,4,4,2,2,1,0,1
15,15,14,10,8,5,4,2,2,1,0,1
18,21,15,16,8,9,4,4,2,2,1,0,1
From _Gus Wiseman_, Jan 23 2019: (Start)
It is possible to augment the triangle to cover the n = 0 and k = n cases, giving:
1
1 0
1 1 0
2 0 1 0
2 2 0 1 0
3 2 1 0 1 0
4 2 3 1 0 1 0
5 4 2 2 1 0 1 0
6 6 3 3 2 1 0 1 0
8 7 5 4 2 2 1 0 1 0
10 8 10 3 5 2 2 1 0 1 0
12 13 8 9 4 4 2 2 1 0 1 0
15 15 14 10 8 5 4 2 2 1 0 1 0
18 21 15 16 8 9 4 4 2 2 1 0 1 0
22 25 23 17 17 7 10 4 4 2 2 1 0 1 0
27 30 32 21 19 16 8 9 4 4 2 2 1 0 1 0
Row seven {5, 4, 2, 2, 1, 0, 1, 0} counts the following integer partitions (empty columns not shown).
(7) (322) (2221) (22111) (211111) (1111111)
(43) (331) (4111) (31111)
(52) (511)
(61) (3211)
(421)
(End)
Row sums are
A000041. Row polynomials evaluated at -1 are
A268498. Row polynomials evaluated at 2 are
A006951.
-
b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(i<1, 0,
add(x^`if`(j=0, 0, j-1)*b(n-i*j, i-1), j=0..n/i))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n-1))(b(n$2)):
seq(T(n), n=1..16); # Alois P. Heinz, Aug 21 2015
-
b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[x^If[j == 0, 0, j-1]*b[n - i*j, i - 1], {j, 0, n/i}]]]]; T[n_] := Function [p, Table[ Coefficient[p, x, i], {i, 0, n - 1}]][b[n, n]]; Table[T[n], {n, 1, 16}] // Flatten (* Jean-François Alcover, Jan 23 2016, after Alois P. Heinz *)
Table[Length[Select[IntegerPartitions[n],Length[#]-Length[Union[#]]==k&]],{n,0,15},{k,0,n}] (* augmented version, Gus Wiseman, Jan 23 2019 *)
-
partitm(n,m,nmin)={ local(resul,partj) ; if( n < 0 || m <0, return([;]) ; ) ; resul=matrix(0,m); if(m==0, return(resul); ) ; for(j=max(1,nmin),n\m, partj=partitm(n-j,m-1,j) ; for(r1=1,matsize(partj)[1], resul=concat(resul,concat([j],partj[r1,])) ; ) ; ) ; if(m==1 && n >= nmin, resul=concat(resul,[[n]]) ; ) ; return(resul) ; }
partit(n)={ local(resul,partm,filr) ; if( n < 0, return([;]) ; ) ; resul=matrix(0,n) ; for(m=1,n, partm=partitm(n,m,1) ; filr=vector(n-m) ; for(r1=1,matsize(partm)[1], resul=concat( resul,concat(partm[r1,],filr) ) ; ) ; ) ; return(resul) ; }
A133121row(n)={ local(p=partit(n),resul=vector(n),nprts,ndprts) ; for(r=1,matsize(p)[1], nprts=0 ; ndprts=0 ; for(c=1,n, if( p[r,c]==0, break, nprts++ ; if(c==1, ndprts++, if(p[r,c]!=p[r,c-1], ndprts++ ) ; ) ; ) ; ) ; k=nprts-ndprts; resul[k+1]++ ; ) ; return(resul) ; }
A133121()={ for(n=1,20, arow=A133121row(n) ; for(k=1,n, print1(arow[k],",") ; ) ; ) ; }
A133121() ; \\ R. J. Mathar, Sep 28 2007
-
tabl(nn) = my(pl = prod(n=1, nn, 1+x^n/(1-y*x^n)) + O(x^nn)); for (k=1, nn-1, print(Vecrev(polcoeff(pl,k,x)))); \\ Michel Marcus, Aug 23 2015
A268498
Expansion of Product_{k>=1} ((1 + 2*x^k) / (1 + x^k)).
Original entry on oeis.org
1, 1, 0, 3, -1, 3, 3, 3, 0, 4, 12, 0, 9, -3, 21, 12, 17, -3, 33, 0, 33, 36, 36, 27, 21, 52, 24, 90, 72, 99, 24, 138, 21, 207, 0, 261, 149, 267, 45, 333, 174, 339, 174, 345, 411, 654, 330, 456, 657, 535, 684, 483, 1233, 489, 1353, 882, 1803, 720, 1902, 756
Offset: 0
-
nmax = 100; CoefficientList[Series[Product[(1+2*x^k)/(1+x^k), {k, 1, nmax}], {x, 0, nmax}], x]
A264686
Expansion of Product_{k>=1} (1 + 2*x^k)/(1 - x^k).
Original entry on oeis.org
1, 3, 6, 15, 27, 51, 93, 159, 264, 432, 696, 1086, 1683, 2553, 3837, 5700, 8367, 12147, 17505, 24972, 35361, 49728, 69402, 96243, 132657, 181782, 247692, 335838, 453042, 608289, 813102, 1082256, 1434519, 1894215, 2491644, 3265869, 4265973, 5553771, 7207167
Offset: 0
-
b:= proc(n, i) option remember; `if`(i*(i+1)/2n, 0, 2*b(n-i, i-1))))
end:
a:= n-> add(b(i$2)*combinat[numbpart](n-i), i=0..n):
seq(a(n), n=0..60); # Alois P. Heinz, Dec 22 2017
-
nmax = 40; CoefficientList[Series[Product[(1 + 2*x^k)/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x]
-
{ my(n=40); Vec(prod(k=1, n, 3/(1-x^k) - 2 + O(x*x^n))) } \\ Andrew Howroyd, Dec 22 2017
A323582
Number of generalized Young tableaux with constant rows, weakly increasing columns, and entries summing to n.
Original entry on oeis.org
1, 1, 3, 5, 11, 16, 33, 47, 85, 126, 208, 299, 486, 685, 1050, 1496, 2221, 3097, 4523, 6239, 8901, 12219, 17093, 23202, 32120, 43200, 58899, 78761, 106210, 140786, 188192, 247689, 327965, 429183, 563592, 732730, 955851, 1235370, 1600205, 2057743, 2649254
Offset: 0
The a(5) = 16 tableaux:
5 1 1 1 1 1
.
1 2 1 1 1 1 1 1 1 1 1 1 1 1
4 3 3 2 1 1 1
.
1 1 1 1 1 1 1 1 1
1 2 1 1 1 1
3 2 2 1 1
.
1 1 1
1 1
1 1
2 1
.
1
1
1
1
1
Cf.
A000085,
A000219,
A003293,
A006951,
A100883,
A138178,
A279784,
A299968,
A323432,
A323436,
A323437,
A323438,
A323450.
-
comps[q_]:=Table[Table[Take[q,{Total[Take[c,i-1]]+1,Total[Take[c,i]]}],{i,Length[c]}],{c,Join@@Permutations/@IntegerPartitions[Length[q]]}];
Table[Sum[Length[Select[comps[ptn],And@@SameQ@@@#&&GreaterEqual@@Length/@#&]],{ptn,Sort/@IntegerPartitions[n]}],{n,10}]
A104575
Alternating sum of diagonals in A060177.
Original entry on oeis.org
1, -1, -2, -1, -1, 3, 1, 7, 4, 4, 4, 2, -9, -7, -7, -28, -17, -25, -15, -24, -11, -8, 34, 19, 53, 46, 108, 110, 106, 113, 122, 108, 75, 103, -16, -87, -107, -169, -329, -257, -574, -501, -676, -609, -749, -588, -808, -548, -521, -315, -240, 369, 485, 865, 1099, 1738, 2129, 2686, 3088, 3460, 4103, 4011, 4480, 3983
Offset: 0
-
CoefficientList[Series[Product[(1-2x^k)/(1-x^k),{k,70}],{x,0,70}],x] (* Harvey P. Dale, Jan 21 2021 *)
-
N=66; x='x+O('x^N); Vec(prod(k=1, N, 1-x^k/(1-x^k))) \\ Seiichi Manyama, Oct 05 2019
A124678
Number of conjugacy classes in PSL_2(p), p = prime(n).
Original entry on oeis.org
3, 4, 5, 6, 8, 9, 11, 12, 14, 17, 18, 21, 23, 24, 26, 29, 32, 33, 36, 38, 39, 42, 44, 47, 51, 53, 54, 56, 57, 59, 66, 68, 71, 72, 77, 78, 81, 84, 86, 89, 92, 93, 98, 99, 101, 102, 108, 114, 116, 117, 119, 122, 123, 128, 131, 134, 137, 138, 141, 143, 144, 149, 156, 158
Offset: 1
- Dornhoff, Larry, Group representation theory. Part A: Ordinary representation theory. Marcel Dekker, Inc., New York, 1971.
-
[ NumberOfClasses(PSL(2,p)) : p in [2,3,5,7,11,13,17,19,23,29,31,37] ];
Comments