1, 1, 0, 1, 1, 0, 1, 3, 0, 0, 1, 6, 1, 0, 0, 1, 10, 5, 0, 0, 0, 1, 15, 15, 1, 0, 0, 0, 1, 21, 35, 7, 0, 0, 0, 0, 1, 28, 70, 28, 1, 0, 0, 0, 0, 1, 36, 126, 84, 9, 0, 0, 0, 0, 0, 1, 45, 210, 210, 45, 1, 0, 0, 0, 0, 0
Offset: 0
Triangle begins :
1
1, 0
1, 1, 0
1, 3, 0, 0
1, 6, 1, 0, 0
1, 10, 5, 0, 0, 0
1, 15, 15, 1, 0, 0, 0
1, 21, 35, 7, 0, 0, 0, 0
1, 28, 70, 28, 1, 0, 0, 0, 0
A384883
Number of maximal sparse subsets of the binary indices of n, where a set is sparse iff 1 is not a first difference.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 4, 2, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 4, 2, 2, 4, 4, 2, 2, 2, 4, 3, 3, 4, 5, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 1, 1, 2
Offset: 0
The binary indices of 27 are {1,2,4,5}, with maximal sparse subsets {{1,4},{1,5},{2,4},{2,5}}, so a(27) = 4.
For subsets of {1..n} we get
A000931 (shifted), maximal case of
A000045 (shifted).
This is the maximal case of
A245564.
The greatest number whose binary indices are one of these subsets is
A374356.
For prime instead of binary indices we have
A385215, maximal case of
A166469.
A034839 counts subsets by number of maximal runs, for strict partitions
A116674.
A202064 counts subsets containing n with k maximal runs.
A384877 gives lengths of maximal anti-runs in binary indices, firsts
A384878.
-
spars[S_]:=Select[Subsets[S],FreeQ[Differences[#],1]&];
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
maximize[sys_]:=Complement@@Prepend[Most[Subsets[#]]&/@sys,sys];
Table[Length[maximize[spars[bpe[n]]]],{n,0,100}]
A385572
Number of subsets of {1..n} with the same number of maximal runs (increasing by 1) as maximal anti-runs (increasing by more than 1).
Original entry on oeis.org
1, 2, 3, 4, 7, 12, 19, 34, 63, 112, 207, 394, 739, 1398, 2687, 5152, 9891, 19128, 37039, 71754, 139459, 271522, 528999, 1032308, 2017291, 3945186, 7723203, 15134440, 29679407, 58245068, 114389683, 224796210, 442021743, 869658304, 1711914351, 3371515306
Offset: 0
The set {2,3,5,6,8} has maximal runs ((2,3),(5,6),(8)) and maximal anti-runs ((2),(3,5),(6,8)) so is counted under a(8).
The a(0) = 1 through a(6) = 19 subsets:
{} {} {} {} {} {} {}
{1} {1} {1} {1} {1} {1}
{2} {2} {2} {2} {2}
{3} {3} {3} {3}
{4} {4} {4}
{1,2,4} {5} {5}
{1,3,4} {1,2,4} {6}
{1,2,5} {1,2,4}
{1,3,4} {1,2,5}
{1,4,5} {1,2,6}
{2,3,5} {1,3,4}
{2,4,5} {1,4,5}
{1,5,6}
{2,3,5}
{2,3,6}
{2,4,5}
{2,5,6}
{3,4,6}
{3,5,6}
The case containing n + 1 is
A217615.
Subsets of this type are ranked by
A385575.
A384175 counts subsets with all distinct lengths of maximal runs, complement
A384176.
A384877 gives lengths of maximal anti-runs in binary indices, firsts
A384878.
-
a:= proc(n) option remember; `if`(n<5, [1, 2, 3, 4, 7][n+1], ((3*n-4)*a(n-1)-
(3*n-5)*a(n-2)+(5*n-12)*a(n-3)-2*(4*n-11)*a(n-4)+4*(n-3)*a(n-5))/(n-1))
end:
seq(a(n), n=0..35); # Alois P. Heinz, Jul 06 2025
-
Table[Length[Select[Subsets[Range[n]],Length[Split[#,#2==#1+1&]]==Length[Split[#,#2!=#1+1&]]&]],{n,0,10}]
-
a(n)=polcoef([1,1,1]*[x,0,0;x,x^2,1;0,x,x]^n*[1,0,0]~,n) \\ Christian Sievers, Jul 06 2025
A384907
Number of permutations of {1..n} with all distinct lengths of maximal anti-runs (not increasing by 1).
Original entry on oeis.org
1, 1, 1, 5, 17, 97, 587, 4291, 33109, 319967, 3106433, 35554459, 419889707, 5632467097, 77342295637, 1201240551077, 18804238105133, 328322081898745, 5832312989183807, 113154541564902427, 2229027473451951265, 47899977701182298255, 1037672943682453127645
Offset: 0
The permutation (1,2,4,3,5,7,8,6,9) has maximal anti-runs ((1),(2,4,3,5,7),(8,6,9)), with lengths (1,5,3), so is counted under a(9).
The a(0) = 1 through a(4) = 17 permutations:
() (1) (2,1) (1,3,2) (1,2,4,3)
(2,1,3) (1,3,2,4)
(2,3,1) (1,4,2,3)
(3,1,2) (1,4,3,2)
(3,2,1) (2,1,3,4)
(2,1,4,3)
(2,3,1,4)
(2,4,1,3)
(2,4,3,1)
(3,1,4,2)
(3,2,1,4)
(3,2,4,1)
(3,4,2,1)
(4,1,3,2)
(4,2,1,3)
(4,3,1,2)
(4,3,2,1)
For subsets instead of permutations we have
A384177.
For runs instead of anti-runs we have
A384891.
A034839 counts subsets by number of maximal runs, for strict partitions
A116674.
A098859 counts Wilf partitions (distinct multiplicities), complement
A336866.
Cf.
A000255,
A044813,
A072574,
A242882,
A325325,
A328592,
A329739,
A351202,
A356606,
A384886,
A384892.
-
Table[Length[Select[Permutations[Range[n]],UnsameQ@@Length/@Split[#,#2!=#1+1&]&]],{n,0,10}]
-
a(n)=if(n,my(b(n)=sum(i=0,n-1,(-1)^i*(n-i)!*binomial(n-1,i)), d=floor(sqrt(2*n)), p=polcoef(prod(i=1,n,1+x*y^i,1+O(y*y^n)*((1-x^(d+1))/(1-x))),n,y)); sum(i=1,d,b(n+1-i)*i!*polcoef(p,i)),1) \\ Christian Sievers, Jun 22 2025
A385215
Number of maximal sparse submultisets of the prime indices of n, where a multiset is sparse iff 1 is not a first difference.
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1
Offset: 1
The sparse submultisets of the prime indices of n = 8 are {{},{1},{1,1},{1,1,1}}, with maximization {{1,1,1}}. So a(8) = 1.
The sparse submultisets of the prime indices of n = 462 are {{},{1},{2},{4},{5},{1,4},{2,4},{1,5},{2,5}}, with maximization {{1,4},{1,5},{2,4},{2,5}}, so a(462) = 4.
The prime indices of n together their a(n) maximal sparse submultisets for n = 1, 6, 210, 462, 30030, 46410:
{} {1,2} {1,2,3,4} {1,2,4,5} {1,2,3,4,5,6} {1,2,3,4,6,7}
------------------------------------------------------------
{} {1} {1,3} {1,4} {2,5} {1,3,6}
{2} {1,4} {1,5} {1,3,5} {1,3,7}
{2,4} {2,4} {1,3,6} {1,4,6}
{2,5} {1,4,6} {1,4,7}
{2,4,6} {2,4,6}
{2,4,7}
This is the maximal case of
A166469.
For binary instead of prime indices we have
A384883, maximal case of
A245564.
The greatest number whose prime indices are one of these submultisets is
A385216.
A034839 counts subsets by number of maximal runs, for strict partitions
A116674.
A384887 counts partitions with equal lengths of gapless runs, distinct
A384884.
-
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
maxq[els_]:=Select[els,Not[Or@@Table[Divisible[oth,#],{oth,DeleteCases[els,#]}]]&];
Table[Length[maxq[Select[Divisors[n],FreeQ[Differences[prix[#]],1]&]]],{n,30}]
A385575
Numbers whose binary indices have the same number of adjacent parts differing by 1 as adjacent parts differing by more than 1.
Original entry on oeis.org
1, 2, 4, 8, 11, 13, 16, 19, 22, 25, 26, 32, 35, 38, 44, 49, 50, 52, 64, 67, 70, 76, 87, 88, 91, 93, 97, 98, 100, 104, 107, 109, 117, 128, 131, 134, 140, 151, 152, 155, 157, 167, 174, 176, 179, 182, 185, 186, 193, 194, 196, 200, 203, 205, 208, 211, 214, 217
Offset: 1
The terms together with their binary expansions and binary indices begin:
1: 1 ~ {1}
2: 10 ~ {2}
4: 100 ~ {3}
8: 1000 ~ {4}
11: 1011 ~ {1,2,4}
13: 1101 ~ {1,3,4}
16: 10000 ~ {5}
19: 10011 ~ {1,2,5}
22: 10110 ~ {2,3,5}
25: 11001 ~ {1,4,5}
26: 11010 ~ {2,4,5}
32: 100000 ~ {6}
35: 100011 ~ {1,2,6}
38: 100110 ~ {2,3,6}
44: 101100 ~ {3,4,6}
49: 110001 ~ {1,5,6}
50: 110010 ~ {2,5,6}
52: 110100 ~ {3,5,6}
64: 1000000 ~ {7}
67: 1000011 ~ {1,2,7}
70: 1000110 ~ {2,3,7}
76: 1001100 ~ {3,4,7}
87: 1010111 ~ {1,2,3,5,7}
88: 1011000 ~ {4,5,7}
91: 1011011 ~ {1,2,4,5,7}
93: 1011101 ~ {1,3,4,5,7}
97: 1100001 ~ {1,6,7}
98: 1100010 ~ {2,6,7}
100: 1100100 ~ {3,6,7}
A384175 counts subsets with all distinct lengths of maximal runs, complement
A384176.
A384877 gives lengths of maximal anti-runs in binary indices, firsts
A384878.
-
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
Select[Range[100],Length[Split[bpe[#],#2==#1+1&]]==Length[Split[bpe[#],#2!=#1+1&]]&]
-
is_ok(n)=hammingweight(n)==2*hammingweight(bitand(n,n>>1))+1 \\ Christian Sievers, Jul 18 2025
A385574
Number of integer partitions of n with the same number of adjacent equal parts as adjacent unequal parts.
Original entry on oeis.org
1, 1, 1, 1, 2, 3, 2, 4, 5, 6, 10, 11, 13, 17, 20, 30, 36, 44, 55, 70, 86, 98, 128, 156, 190, 235, 288, 351, 409, 499, 603, 722, 863, 1025, 1227, 1461, 1757, 2061, 2444, 2892, 3406, 3996, 4708, 5497, 6430, 7595, 8835, 10294, 12027, 13971, 16252, 18887, 21878
Offset: 0
The partition (5,3,2,1,1,1,1) has 4 runs ((5),(3),(2),(1,1,1,1)) and 4 anti-runs ((5,3,2,1),(1),(1),(1)) so is counted under a(14).
The a(1) = 1 through a(10) = 10 reversed partitions (A = 10):
(1) (2) (3) (4) (5) (6) (7) (8) (9) (A)
(112) (113) (114) (115) (116) (117) (118)
(122) (133) (224) (144) (226)
(223) (233) (225) (244)
(11123) (11124) (334)
(11223) (11125)
(11134)
(11224)
(11233)
(12223)
These partitions are ranked by
A385576.
Cf.
A000071,
A003114,
A008284,
A010027,
A047966,
A210034,
A325324,
A325325,
A356606,
A384882,
A384885.
-
Table[Length[Select[Reverse/@IntegerPartitions[n],Length[Union[#]]==Length[Split[#,#2!=#1&]]&]],{n,0,30}]
-
lista(n)=Vec(polcoef((prod(i=1,n,1+x^i/(t*(1-t*x^i))+O(x*x^n))-1)*t+1,0,t)) \\ Christian Sievers, Jul 18 2025
Comments