A188575
Number of non-complete compositions of n.
Original entry on oeis.org
0, 1, 1, 4, 8, 14, 31, 63, 129, 248, 509, 1011, 2044, 4089, 8167, 16360, 32725, 65482, 131017, 262176, 524167, 1048678, 2096985, 4194358, 8387802, 16776408, 33550943, 67101615, 134199983, 268399122, 536793004, 1073590077, 2147187353, 4294419287, 8588940438
Offset: 1
-
b:= proc(n, i, t) option remember; `if`(n=0, `if`(i=0, t!, 0),
`if`(i<1 or n 2^(n-1) -add(b(n, i, 0), i=1..n):
seq(a(n), n=1..40); # Alois P. Heinz, Dec 06 2014
-
b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[i == 0, t!, 0], If[i<1 || nJean-François Alcover, Mar 09 2015, after Alois P. Heinz *)
A332272
Number of narrowly recursively normal integer partitions of n.
Original entry on oeis.org
1, 1, 2, 3, 5, 6, 8, 10, 14, 18, 23, 30, 37, 46, 52, 70, 80, 100, 116, 146, 171, 203, 236, 290, 332, 401, 458, 547, 626, 744, 851, 1004, 1157, 1353, 1553, 1821, 2110, 2434, 2810, 3250, 3741, 4304, 4949, 5661, 6510, 7450, 8501, 9657, 11078, 12506, 14329, 16185
Offset: 0
The a(6) = 8 partitions are (6), (51), (42), (411), (33), (321), (222), (111111). Missing from this list are (3111), (2211), (21111).
The a(1) = 1 through a(8) = 14 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (21) (22) (32) (33) (43) (44)
(111) (31) (41) (42) (52) (53)
(211) (221) (51) (61) (62)
(1111) (311) (222) (322) (71)
(11111) (321) (331) (332)
(411) (421) (422)
(111111) (511) (431)
(3211) (521)
(1111111) (611)
(2222)
(3221)
(4211)
(11111111)
The strict instead of narrow version is
A330937.
The widely normal case is
A332277(n) - 1 for n > 1.
The wide version is
A332295(n) - 1.
Cf.
A000009,
A107429,
A181819,
A316496,
A317081,
A317245,
A317491,
A329744,
A329746,
A329766,
A332576.
-
normQ[m_]:=m=={}||Union[m]==Range[Max[m]];
recnQ[ptn_]:=With[{qtn=Length/@Split[ptn]},Or[Length[qtn]<=1,And[normQ[qtn],recnQ[qtn]]]];
Table[Length[Select[IntegerPartitions[n],recnQ]],{n,0,30}]
A332673
Triangle read by rows where T(n,k) is the number of length-k ordered set partitions of {1..n} whose non-adjacent blocks are pairwise increasing.
Original entry on oeis.org
1, 0, 1, 0, 1, 2, 0, 1, 6, 3, 0, 1, 14, 14, 5, 0, 1, 30, 45, 32, 8, 0, 1, 62, 124, 131, 65, 13, 0, 1, 126, 315, 438, 323, 128, 21, 0, 1, 254, 762, 1305, 1270, 747, 243, 34, 0, 1, 510, 1785, 3612, 4346, 3370, 1629, 452, 55
Offset: 0
Triangle begins:
1
0 1
0 1 2
0 1 6 3
0 1 14 14 5
0 1 30 45 32 8
0 1 62 124 131 65 13
0 1 126 315 438 323 128 21
0 1 254 762 1305 1270 747 243 34
...
Row n = 4 counts the following ordered set partitions:
{1234} {1}{234} {1}{2}{34} {1}{2}{3}{4}
{12}{34} {1}{23}{4} {1}{2}{4}{3}
{123}{4} {12}{3}{4} {1}{3}{2}{4}
{124}{3} {1}{24}{3} {2}{1}{3}{4}
{13}{24} {12}{4}{3} {2}{1}{4}{3}
{134}{2} {1}{3}{24}
{14}{23} {13}{2}{4}
{2}{134} {1}{34}{2}
{23}{14} {1}{4}{23}
{234}{1} {2}{1}{34}
{24}{13} {2}{13}{4}
{3}{124} {2}{14}{3}
{34}{12} {23}{1}{4}
{4}{123} {3}{12}{4}
An apparently related triangle is
A056242.
Ordered set-partitions are
A000670.
Non-unimodal normal sequences are
A328509.
-
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
Table[Length[Select[Join@@Permutations/@sps[Range[n]],Length[#]==k&&!MatchQ[#,{_,{_,a_,_},,{_,b_,_},_}/;a>b]&]],{n,0,5},{k,0,n}]
A329748
Number of complete compositions of n whose multiplicities cover an initial interval of positive integers.
Original entry on oeis.org
1, 1, 0, 2, 3, 3, 6, 12, 12, 42, 114, 210, 60, 360, 720, 1320, 1590, 3690, 6450, 16110, 33120, 59940, 61320, 112980, 171780, 387240, 803880, 769440, 1773240, 2823240, 5790960, 9916200, 19502280, 28244160, 56881440, 130548600, 279578880, 320554080, 541323720
Offset: 0
The a(1) = 1 through a(8) = 12 compositions (empty column not shown):
(1) (12) (112) (122) (123) (1123) (1223)
(21) (121) (212) (132) (1132) (1232)
(211) (221) (213) (1213) (1322)
(231) (1231) (2123)
(312) (1312) (2132)
(321) (1321) (2213)
(2113) (2231)
(2131) (2312)
(2311) (2321)
(3112) (3122)
(3121) (3212)
(3211) (3221)
Looking at run-lengths instead of multiplicities gives
A329749.
The non-complete version is
A329741.
-
normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],normQ[#]&&normQ[Length/@Split[Sort[#]]]&]],{n,0,10}]
A332274
Number of totally strong compositions of n.
Original entry on oeis.org
1, 1, 2, 4, 7, 11, 22, 33, 56, 93, 162, 264, 454, 765, 1307, 2237, 3849, 6611, 11472, 19831, 34446, 59865, 104293, 181561, 316924
Offset: 0
The a(1) = 1 through a(5) = 11 compositions:
(1) (2) (3) (4) (5)
(11) (12) (13) (14)
(21) (22) (23)
(111) (31) (32)
(121) (41)
(211) (122)
(1111) (131)
(212)
(311)
(2111)
(11111)
The co-strong case is
A332274 (this sequence).
The case of reversed partitions is
A332275.
The alternating version is
A332338.
Cf.
A100883,
A107429,
A317245,
A317256,
A317491,
A329744,
A332272,
A332279,
A332289,
A332292,
A332336,
A332337,
A332339,
A332340.
-
tni[q_]:=Or[q=={},q=={1},And[GreaterEqual@@Length/@Split[q],tni[Length/@Split[q]]]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],tni]],{n,0,15}]
A333148
Number of compositions of n whose non-adjacent parts are weakly decreasing.
Original entry on oeis.org
1, 1, 2, 4, 7, 12, 19, 30, 46, 69, 102, 149, 214, 304, 428, 596, 823, 1127, 1532, 2068, 2774, 3697, 4900, 6460, 8474, 11061, 14375, 18600, 23970, 30770, 39354, 50153, 63702, 80646, 101783, 128076, 160701, 201076, 250933, 312346, 387832, 480409, 593716, 732105, 900810, 1106063, 1355336, 1657517, 2023207, 2464987, 2997834, 3639464
Offset: 0
The a(1) = 1 through a(6) = 19 compositions:
(1) (2) (3) (4) (5) (6)
(11) (12) (13) (14) (15)
(21) (22) (23) (24)
(111) (31) (32) (33)
(121) (41) (42)
(211) (131) (51)
(1111) (212) (141)
(221) (222)
(311) (231)
(1211) (312)
(2111) (321)
(11111) (411)
(1311)
(2121)
(2211)
(3111)
(12111)
(21111)
(111111)
For example, (2,3,1,2) is such a composition, because the non-adjacent pairs of parts are (2,1), (2,2), (3,2), all of which are weakly decreasing.
The case of normal sequences appears to be
A028859.
A version for ordered set partitions is
A332872.
The case of strict compositions is
A333150.
The version for strictly decreasing parts is
A333193.
Standard composition numbers (
A066099) of these compositions are
A334966.
Cf.
A056242,
A059204,
A072706,
A107429,
A115981,
A329398,
A332578,
A332669,
A332673,
A332724,
A332834.
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,{_,x_,,y_,_}/;y>x]&]],{n,0,15}]
-
def a333148(n): return number_of_partitions(n) + sum( Partitions(m, max_part=l, length=k).cardinality() * Partitions(n-m-l^2, min_length=k+2*l).cardinality() for l in range(1, (n+1).isqrt()) for m in range((n-l^2-2*l)*l//(l+1)+1) for k in range(ceil(m/l), min(m,n-m-l^2-2*l)+1) ) # Max Alekseyev, Oct 31 2024
A339886
Numbers whose prime indices cover an interval of positive integers starting with 2.
Original entry on oeis.org
1, 3, 9, 15, 27, 45, 75, 81, 105, 135, 225, 243, 315, 375, 405, 525, 675, 729, 735, 945, 1125, 1155, 1215, 1575, 1875, 2025, 2187, 2205, 2625, 2835, 3375, 3465, 3645, 3675, 4725, 5145, 5625, 5775, 6075, 6561, 6615, 7875, 8085, 8505, 9375, 10125, 10395, 10935
Offset: 1
The sequence of terms together with their prime indices begins:
3: {2}
9: {2,2}
15: {2,3}
27: {2,2,2}
45: {2,2,3}
75: {2,3,3}
81: {2,2,2,2}
105: {2,3,4}
135: {2,2,2,3}
225: {2,2,3,3}
243: {2,2,2,2,2}
315: {2,2,3,4}
375: {2,3,3,3}
405: {2,2,2,2,3}
525: {2,3,3,4}
675: {2,2,2,3,3}
729: {2,2,2,2,2,2}
735: {2,3,4,4}
945: {2,2,2,3,4}
The version starting at 1 is
A055932.
The partitions with these Heinz numbers are counted by
A264396.
A000009 counts partitions covering an initial interval.
A000070 counts partitions with a selected part.
A016945 lists numbers with smallest prime index 2.
A034296 counts gap-free (or flat) partitions.
A073491 lists numbers with gap-free prime indices.
A325240 lists numbers with smallest prime multiplicity 2.
Cf.
A001223,
A001522,
A006128,
A007052,
A124010,
A257989,
A257993,
A264401,
A317090,
A317589,
A339737.
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
Select[Range[100],normQ[primeMS[#]-1]&]
A371447
Numbers whose binary indices of prime indices cover an initial interval of positive integers.
Original entry on oeis.org
1, 2, 4, 5, 6, 8, 10, 12, 15, 16, 17, 18, 20, 24, 25, 26, 30, 32, 33, 34, 35, 36, 40, 42, 45, 47, 48, 50, 51, 52, 54, 55, 60, 64, 65, 66, 68, 70, 72, 75, 78, 80, 84, 85, 86, 90, 94, 96, 99, 100, 102, 104, 105, 108, 110, 119, 120, 123, 125, 126, 127, 128, 130
Offset: 1
The terms together with their binary indices of prime indices begin:
1: {}
2: {{1}}
4: {{1},{1}}
5: {{1,2}}
6: {{1},{2}}
8: {{1},{1},{1}}
10: {{1},{1,2}}
12: {{1},{1},{2}}
15: {{2},{1,2}}
16: {{1},{1},{1},{1}}
17: {{1,2,3}}
18: {{1},{2},{2}}
20: {{1},{1},{1,2}}
24: {{1},{1},{1},{2}}
25: {{1,2},{1,2}}
26: {{1},{2,3}}
30: {{1},{2},{1,2}}
32: {{1},{1},{1},{1},{1}}
For prime indices of prime indices we have
A320456.
For binary indices of binary indices we have
A326754.
The case with squarefree product of prime indices is
A371448.
The connected components of this multiset system are counted by
A371451.
A000009 counts partitions covering initial interval, compositions
A107429.
A011782 counts multisets covering an initial interval.
A070939 gives length of binary expansion.
A131689 counts patterns by number of distinct parts.
-
normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Select[Range[1000],normQ[Join@@bpe/@prix[#]]&]
A373306
Sum over all complete compositions of n of the element multiset size.
Original entry on oeis.org
0, 1, 2, 7, 13, 30, 73, 157, 345, 743, 1650, 3517, 7593, 16120, 34294, 72683, 153475, 323293, 679231, 1423721, 2977692, 6218395, 12959249, 26970243, 56037071, 116280086, 240953162, 498719275, 1031029386, 2129266321, 4392871427, 9054428894, 18645998093
Offset: 0
a(1) = 1: 1.
a(2) = 2: 11.
a(3) = 7 = 2 + 2 + 3: 12, 21, 111.
a(4) = 13 = 3 + 3 + 3 + 4: 112, 121, 211, 1111.
a(5) = 30 = 3*3 + 4*4 + 5: 122, 212, 221, 1112, 1121, 1211, 2111, 11111.
-
b:= proc(n, i, t) option remember; `if`(n=0, `if`(i=0, [t!, 0], 0),
`if`(i<1 or n p+[0, p[1]]*j)(
b(n-i*j, i-1, t+j)/j!), j=1..n/i)))
end:
a:= n-> add(b(n, k, 0)[2], k=0..floor((sqrt(1+8*n)-1)/2)):
seq(a(n), n=0..32);
-
b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[i == 0, {t!, 0}, {0, 0}], If[i < 1 || n < i*(i + 1)/2, {0, 0}, Sum[Function[p, p + {0, p[[1]]}*j][b[n - i*j, i - 1, t + j]/j!], {j, 1, n/i}]]];
a[n_] := Sum[b[n, k, 0][[2]], {k, 0, Floor[(Sqrt[1 + 8*n] - 1)/2]}];
Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Jun 08 2024, after Alois P. Heinz *)
A374147
Number of complete Carlitz compositions of n.
Original entry on oeis.org
1, 0, 2, 1, 1, 8, 7, 9, 20, 49, 72, 115, 202, 349, 695, 1171, 2009, 3530, 6203, 10818, 19320, 33961, 59449, 104349, 183370, 321635, 564081, 992513, 1741441, 3057547, 5363570, 9410785, 16516575, 28967505, 50798456, 89106542, 156276871, 274037619, 480437247, 842350671, 1476760717, 2588651452, 4537418431, 7952741429, 13938276465
Offset: 1
a(7) = 7 counts: (1,2,1,3), (1,2,3,1), (1,3,2,1), (1,3,1,2), (2,1,3,1), (3,2,1,2), (1,2,1,2,1).
-
Ca_x(s,N)={my(x='x+O('x^N), g=if(#s <1,1, sum(i=1,#s, (Ca_x(s[^i],N) * x^(s[i])/(1+x^(s[i]))))/(1-sum(i=1,#s, (x^(s[i]))/(1+x^(s[i])))))); return(g)}
B_x(N)={my(x='x+O('x^N), j=1, h=0); while((j*(j+1))/2 <= N, h += Ca_x([1..j],N+1); j+=1); my(a = Vec(h)); vector(N,i,a[i])}
B_x(45)
Comments