A329746
Triangle read by rows where T(n,k) is the number of integer partitions of n > 0 with runs-resistance k, 0 <= k <= n - 1.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 0, 1, 3, 4, 3, 0, 0, 1, 1, 4, 8, 1, 0, 0, 1, 3, 6, 10, 2, 0, 0, 0, 1, 2, 8, 13, 6, 0, 0, 0, 0, 1, 3, 11, 20, 7, 0, 0, 0, 0, 0, 1, 1, 11, 29, 14, 0, 0, 0, 0, 0, 0, 1, 5, 19, 31, 20, 1, 0, 0, 0, 0, 0, 0
Offset: 1
Triangle begins:
1
1 1
1 1 1
1 2 1 1
1 1 2 3 0
1 3 4 3 0 0
1 1 4 8 1 0 0
1 3 6 10 2 0 0 0
1 2 8 13 6 0 0 0 0
1 3 11 20 7 0 0 0 0 0
1 1 11 29 14 0 0 0 0 0 0
1 5 19 31 20 1 0 0 0 0 0 0
1 1 17 50 30 2 0 0 0 0 0 0 0
1 3 25 64 37 5 0 0 0 0 0 0 0 0
1 3 29 74 62 7 0 0 0 0 0 0 0 0 0
Row n = 8 counts the following partitions:
(8) (44) (53) (332) (4211)
(2222) (62) (422) (32111)
(11111111) (71) (611)
(431) (3221)
(521) (5111)
(3311) (22211)
(41111)
(221111)
(311111)
(2111111)
The version for compositions is
A329744.
The version for binary words is
A329767.
-
runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
Table[Length[Select[IntegerPartitions[n],runsres[#]==k&]],{n,10},{k,0,n-1}]
-
\\ rr(p) gives runs resistance of partition.
rr(p)={my(r=0); while(#p > 1, my(L=List(), k=0); for(i=1, #p, if(i==#p||p[i]<>p[i+1], listput(L, i-k); k=i)); p=Vec(L); r++); r}
row(n)={my(v=vector(n)); forpart(p=n, v[1+rr(Vec(p))]++); v}
{ for(n=1, 10, print(row(n))) } \\ Andrew Howroyd, Jan 19 2023
A225486
Maximal frequency depth for the partitions of n.
Original entry on oeis.org
0, 2, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
Offset: 1
Run lengths are
A325258, i.e., first differences of Levine's sequence
A011784.
Cf.
A008284,
A116608,
A181819,
A182850,
A182857,
A225485,
A323014,
A323023,
A325239,
A325242,
A325254,
A325282,
A325283.
-
c[s_] := c[s] = Select[Table[Count[s, i], {i, 1, Max[s]}], # > 0 &]
f[s_] := f[s] = Drop[FixedPointList[c, s], -2]
t[s_] := t[s] = Length[f[s]]
u[n_] := u[n] = Table[t[Part[IntegerPartitions[n], k]],
{k, 1, Length[IntegerPartitions[n]]}];
Prepend[Table[Max[u[n]], {n, 2, 10}], 0]
(* second program *)
grw[q_]:=Join@@Table[ConstantArray[i,q[[Length[q]-i+1]]],{i,Length[q]}];
Join@@MapIndexed[ConstantArray[#2[[1]]-1,#1]&,Length[#]-Last[#]&/@NestList[grw,{1,1},6]] (* Gus Wiseman, Apr 19 2019 *)
A319411
Triangle read by rows: T(n,k) = number of binary vectors of length n with runs-resistance k (1 <= k <= n).
Original entry on oeis.org
2, 2, 2, 2, 2, 4, 2, 4, 6, 4, 2, 2, 12, 12, 4, 2, 6, 30, 18, 8, 0, 2, 2, 44, 44, 32, 4, 0, 2, 6, 82, 76, 74, 16, 0, 0, 2, 4, 144, 138, 172, 52, 0, 0, 0, 2, 6, 258, 248, 350, 156, 4, 0, 0, 0, 2, 2, 426, 452, 734, 404, 28, 0, 0, 0, 0, 2, 10, 790, 752, 1500, 938, 104, 0, 0, 0, 0, 0
Offset: 1
Triangle begins:
2,
2, 2,
2, 2, 4,
2, 4, 6, 4,
2, 2, 12, 12, 4,
2, 6, 30, 18, 8, 0,
2, 2, 44, 44, 32, 4, 0,
2, 6, 82, 76, 74, 16, 0, 0,
2, 4, 144, 138, 172, 52, 0, 0, 0,
2, 6, 258, 248, 350, 156, 4, 0, 0, 0,
2, 2, 426, 452, 734, 404, 28, 0, 0, 0, 0,
2, 10, 790, 752, 1500, 938, 104, 0, 0, 0, 0, 0,
...
Lenormand gives the first 20 rows.
The calculation of row 4 is as follows.
We may assume the first bit is a 0, and then double the answers.
vector / runs / steps to reach a single number:
0000 / 4 / 1
0001 / 31 -> 11 -> 2 / 3
0010 / 211 -> 12 -> 11 -> 2 / 4
0011 / 22 -> 2 / 2
0100 / 112 -> 21 -> 11 -> 2 / 4
0101 / 1111 -> 4 / 2
0110 / 121 -> 111 -> 3 / 3
0111 / 13 -> 11 -> 2 / 3
and we get 1 (once), 2 (twice), 3 (three times) and 4 (twice).
So row 4 is: 2,4,6,4.
Column k = 3 is 2 *
A329745 (because runs-resistance 2 for compositions corresponds to runs-resistance 3 for binary words).
The version for compositions is
A329744.
The version for partitions is
A329746.
The number of nonzero entries in row n > 0 is
A319412(n).
The runs-resistance of the binary expansion of n is
A318928.
Cf.
A096365,
A225485,
A245563,
A319413,
A319414,
A319415,
A325280,
A329747,
A329750,
A329767,
A329870.
-
runsresist[q_]:=If[Length[q]==1,1,Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1];
Table[Length[Select[Tuples[{0,1},n],runsresist[#]==k&]],{n,10},{k,n}] (* Gus Wiseman, Nov 25 2019 *)
A329767
Triangle read by rows where T(n,k) is the number of binary words of length n >= 0 with runs-resistance k, 0 <= k <= n.
Original entry on oeis.org
1, 2, 0, 0, 2, 2, 0, 2, 2, 4, 0, 2, 4, 6, 4, 0, 2, 2, 12, 12, 4, 0, 2, 6, 30, 18, 8, 0, 0, 2, 2, 44, 44, 32, 4, 0, 0, 2, 6, 82, 76, 74, 16, 0, 0, 0, 2, 4, 144, 138, 172, 52, 0, 0, 0, 0, 2, 6, 258, 248, 350, 156, 4, 0, 0, 0, 0, 2, 2, 426, 452, 734, 404, 28, 0, 0, 0, 0
Offset: 0
Triangle begins:
1
2 0
0 2 2
0 2 2 4
0 2 4 6 4
0 2 2 12 12 4
0 2 6 30 18 8 0
0 2 2 44 44 32 4 0
0 2 6 82 76 74 16 0 0
0 2 4 144 138 172 52 0 0 0
0 2 6 258 248 350 156 4 0 0 0
0 2 2 426 452 734 404 28 0 0 0 0
For example, row n = 4 counts the following words:
0000 0011 0001 0010
1111 0101 0110 0100
1010 0111 1011
1100 1000 1101
1001
1110
The version for compositions is
A329744.
The version for partitions is
A329746.
The number of nonzero entries in row n > 0 is
A319412(n).
The runs-resistance of the binary expansion of n is
A318928.
-
runsres[q_]:=If[Length[q]==1,0,Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1];
Table[Length[Select[Tuples[{0,1},n],runsres[#]==k&]],{n,0,10},{k,0,n}]
A353865
Number of complete rucksack partitions of n. Partitions whose weak run-sums are distinct and cover an initial interval of nonnegative integers.
Original entry on oeis.org
1, 1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 5, 2, 3, 4, 3, 2, 4, 3, 3, 4, 4, 3, 4, 3, 4, 5, 5, 4, 6, 4, 6, 5, 4, 5, 6, 5, 6, 7, 6, 5, 9, 6, 6, 7, 6, 8, 9, 6, 6, 8, 9, 7, 9, 9, 7, 10, 9, 8, 13, 7, 10, 11, 8, 9, 10, 11, 12, 9, 11, 9, 15, 12, 12, 19, 13, 16, 16
Offset: 0
The a(n) compositions for n = 1, 3, 9, 15, 18:
(1) (21) (4311) (54321) (543321)
(111) (51111) (532221) (654111)
(111111111) (651111) (7611111)
(81111111) (111111111111111111)
(111111111111111)
For example, the weak runs of y = {7,5,4,4,3,3,3,1,1} are {}, {1}, {1,1}, {3}, {4}, {5}, {3,3}, {7}, {4,4}, {3,3,3}, with sums 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, which are all distinct and cover an initial interval, so y is counted under a(31).
These partitions are ranked by
A353867.
A353832 represents the operation of taking run-sums of a partition.
A353836 counts partitions by number of distinct run-sums.
A353850 counts compositions with all distinct run-sums, ranked by
A353852.
A353863 counts partitions whose weak run-sums cover an initial interval.
-
norqQ[m_]:=Sort[m]==Range[0,Max[m]];
msubs[s_]:=Join@@@Tuples[Table[Take[t,i],{t,Split[s]},{i,0,Length[t]}]];
Table[Length[Select[IntegerPartitions[n],norqQ[Total/@Select[msubs[#],SameQ@@#&]]&]],{n,0,15}]
-
a(n) = my(c=0, s, v); if(n, forpart(p=n, if(p[1]==1, v=List([s=1]); for(i=2, #p, if(p[i]==p[i-1], listput(v, s+=p[i]), listput(v, s=p[i]))); s=#v; listsort(v, 1); if(s==#v&&s==v[s], c++))); c, 1); \\ Jinyuan Wang, Feb 21 2025
A351592
Number of Look-and-Say partitions (A239455) of n without distinct multiplicities, i.e., those that are not Wilf partitions (A098859).
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 1, 0, 5, 2, 8, 9, 8, 6, 21, 14, 20, 26, 31, 24, 53, 35, 60, 68, 78, 76, 140, 115, 163, 183, 232, 218, 343, 301, 433, 432, 565, 542, 774, 728, 958, 977, 1251, 1220, 1612, 1561, 2053, 2090, 2618, 2609, 3326, 3378
Offset: 0
The a(9) = 1 through a(18) = 5 partitions are (empty columns not shown):
n=9: n=12: n=15: n=16: n=18:
--------------------------------------------------------------
(222111) (333111) (333222) (33331111) (444222)
(22221111) (444111) (555111)
(2222211111) (3322221111)
(32222211111)
(222222111111)
Non-Look-and-Say partitions are counted by
A351293, ranked by
A351295.
A032020 = number of binary expansions with all distinct run-lengths.
A044813 = numbers whose binary expansion has all distinct run-lengths.
A329738 = compositions with all equal run-lengths.
A329739 = compositions with all distinct run-lengths
A351013 = compositions with all distinct runs.
A351017 = binary words with all distinct run-lengths, for all runs
A351016.
A351292 = patterns with all distinct run-lengths, for all runs
A351200.
Cf.
A000041,
A008284,
A018783,
A047966,
A181819,
A182857,
A238130,
A305563,
A319149,
A351203,
A351204,
A351290.
-
Table[Length[Select[IntegerPartitions[n], !UnsameQ@@Length/@Split[#]&&Select[Permutations[#], UnsameQ@@Length/@Split[#]&]!={}&]],{n,0,15}]
A325278
Smallest number with adjusted frequency depth n.
Original entry on oeis.org
1, 2, 4, 6, 12, 60, 2520, 1286485200, 35933692027611398678865941374040400000
Offset: 0
Cf.
A011784,
A056239,
A112798,
A118914,
A181819,
A181821,
A182857,
A225485,
A323023,
A325258,
A325272,
A325277,
A325278,
A325280.
-
nn=10000;
fd[n_]:=Switch[n,1,0,?PrimeQ,1,,1+fd[Times@@Prime/@Last/@FactorInteger[n]]];
fds=fd/@Range[nn];
Sort[Table[Position[fds,x][[1,1]],{x,Union[fds]}]]
A325282
Maximum adjusted frequency depth among integer partitions of n.
Original entry on oeis.org
0, 1, 2, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
Offset: 0
Cf.
A011784,
A032741,
A127002,
A181819,
A225486,
A275870,
A323014,
A323023,
A325245,
A325254,
A325258,
A325278,
A325282,
A325283.
-
fdadj[ptn_List]:=If[ptn=={},0,Length[NestWhileList[Sort[Length/@Split[#]]&,ptn,Length[#]>1&]]];
Table[Max@@fdadj/@IntegerPartitions[n],{n,0,30}]
A378622
Array read by antidiagonals downward where A(n,k) is the n-th term of the k-th differences of the strict partition numbers A000009.
Original entry on oeis.org
1, 1, 0, 1, 0, 0, 2, 1, 1, 1, 2, 0, -1, -2, -3, 3, 1, 1, 2, 4, 7, 4, 1, 0, -1, -3, -7, -14, 5, 1, 0, 0, 1, 4, 11, 25, 6, 1, 0, 0, 0, -1, -5, -16, -41, 8, 2, 1, 1, 1, 1, 2, 7, 23, 64, 10, 2, 0, -1, -2, -3, -4, -6, -13, -36, -100, 12, 2, 0, 0, 1, 3, 6, 10, 16, 29, 65, 165
Offset: 0
As a table (read by antidiagonals downward):
n=0: n=1: n=2: n=3: n=4: n=5: n=6: n=7: n=8:
----------------------------------------------------------
k=0: 1 1 1 2 2 3 4 5 6
k=1: 0 0 1 0 1 1 1 1 2
k=2: 0 1 -1 1 0 0 0 1 0
k=3: 1 -2 2 -1 0 0 1 -1 0
k=4: -3 4 -3 1 0 1 -2 1 1
k=5: 7 -7 4 -1 1 -3 3 0 -3
k=6: -14 11 -5 2 -4 6 -3 -3 7
k=7: 25 -16 7 -6 10 -9 0 10 -14
k=8: -41 23 -13 16 -19 9 10 -24 24
k=9: 64 -36 29 -35 28 1 -34 48 -34
As a triangle (read by rows):
1
1 0
1 0 0
2 1 1 1
2 0 -1 -2 -3
3 1 1 2 4 7
4 1 0 -1 -3 -7 -14
5 1 0 0 1 4 11 25
6 1 0 0 0 -1 -5 -16 -41
8 2 1 1 1 1 2 7 23 64
First column is
A293467 (up to sign).
For squarefree numbers we have
A377038.
For nonsquarefree numbers we have
A377046.
Position of first zero in each row is
A377285.
-
nn=20;
t=Table[Take[Differences[PartitionsQ/@Range[0,2nn],k],nn],{k,0,nn}];
Table[t[[j,i-j+1]],{i,nn/2},{j,i}]
A325245
Number of integer partitions of n with adjusted frequency depth 3.
Original entry on oeis.org
0, 0, 0, 1, 1, 2, 4, 4, 6, 8, 11, 11, 19, 17, 25, 29, 37, 37, 56, 53, 75, 80, 99, 103, 145, 143, 181, 199, 247, 255, 336, 339, 426, 459, 548, 590, 738, 759, 916, 999, 1192, 1259, 1529, 1609, 1915, 2083, 2406, 2589, 3085, 3267, 3809, 4134, 4763, 5119, 5964
Offset: 0
The a(3) = 1 through a(10) = 11 partitions:
(21) (31) (32) (42) (43) (53) (54) (64)
(41) (51) (52) (62) (63) (73)
(321) (61) (71) (72) (82)
(2211) (421) (431) (81) (91)
(521) (432) (532)
(3311) (531) (541)
(621) (631)
(222111) (721)
(3322)
(4321)
(4411)
Cf.
A008284,
A047966,
A116608,
A127002,
A181819,
A182850,
A323014,
A323023,
A325239,
A325246,
A325254,
A325268,
A325280.
-
fdadj[ptn_List]:=If[ptn=={},0,Length[NestWhileList[Sort[Length/@Split[#]]&,ptn,Length[#]>1&]]];
Table[Length[Select[IntegerPartitions[n],fdadj[#]==3&]],{n,0,30}]
Comments