A325986
Heinz numbers of complete strict integer partitions.
Original entry on oeis.org
1, 2, 6, 30, 42, 210, 330, 390, 462, 510, 546, 714, 798, 2310, 2730, 3570, 3990, 4290, 4830, 5610, 6006, 6090, 6270, 6510, 6630, 7410, 7590, 7854, 8778, 8970, 9282, 9570, 9690, 10230, 10374, 10626, 11310, 11730, 12090, 12210, 12558, 13398, 13566, 14322, 14430
Offset: 1
The sequence of terms together with their prime indices begins:
1: {}
2: {1}
6: {1,2}
30: {1,2,3}
42: {1,2,4}
210: {1,2,3,4}
330: {1,2,3,5}
390: {1,2,3,6}
462: {1,2,4,5}
510: {1,2,3,7}
546: {1,2,4,6}
714: {1,2,4,7}
798: {1,2,4,8}
2310: {1,2,3,4,5}
2730: {1,2,3,4,6}
3570: {1,2,3,4,7}
3990: {1,2,3,4,8}
4290: {1,2,3,5,6}
4830: {1,2,3,4,9}
5610: {1,2,3,5,7}
-
hwt[n_]:=Total[Cases[FactorInteger[n],{p_,k_}:>PrimePi[p] k]];
Select[Range[1000],SquareFreeQ[#]&&Union[hwt/@Divisors[#]]==Range[0,hwt[#]]&]
A325765
Number of integer partitions of n with a unique consecutive subsequence summing to every positive integer from 1 to n.
Original entry on oeis.org
1, 1, 1, 2, 1, 3, 1, 3, 2, 3, 1, 5, 1, 3, 3, 4, 1, 5, 1, 5, 3, 3, 1, 7, 2, 3, 3, 5, 1, 7, 1, 5, 3, 3, 3, 8, 1, 3, 3, 7, 1, 7, 1, 5, 5, 3, 1, 9, 2, 5, 3
Offset: 0
The a(1) = 1 through a(13) = 3 partitions:
(1) (11) (21) (1111) (221) (111111) (2221) (3311)
(111) (311) (4111) (11111111)
(11111) (1111111)
.
(22221) (1111111111) (33311) (111111111111) (2222221)
(51111) (44111) (7111111)
(111111111) (222221) (1111111111111)
(611111)
(11111111111)
Cf.
A000041,
A002033,
A103295,
A103300,
A143823,
A169942,
A325676,
A325683,
A325768,
A325769,
A325770.
-
normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
Table[Length[Select[IntegerPartitions[n],normQ[Total/@Union[ReplaceList[#,{_,s__,_}:>{s}]]]&&UnsameQ@@Total/@Union[ReplaceList[#,{_,s__,_}:>{s}]]&]],{n,0,20}]
A325786
Number of complete necklace compositions of n.
Original entry on oeis.org
1, 1, 2, 2, 4, 7, 12, 19, 41, 71, 141, 255, 509, 924, 1882, 3395, 6838, 12715, 25233, 47049
Offset: 1
The a(1) = 1 through a(8) = 19 necklace compositions:
(1) (11) (12) (112) (113) (123) (124) (1124)
(111) (1111) (122) (132) (142) (1133)
(1112) (1113) (1114) (1142)
(11111) (1122) (1123) (1214)
(1212) (1132) (1223)
(11112) (1213) (1322)
(111111) (1222) (11114)
(11113) (11123)
(11122) (11132)
(11212) (11213)
(111112) (11222)
(1111111) (11312)
(12122)
(111113)
(111122)
(111212)
(112112)
(1111112)
(11111111)
Cf.
A000740,
A002033,
A008965,
A103295,
A108917,
A126796,
A276024,
A325549,
A325682,
A325781,
A325788,
A325789,
A325791.
-
neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
subalt[q_]:=Union[ReplaceList[q,{_,s__,_}:>{s}],DeleteCases[ReplaceList[q,{t___,,u___}:>{u,t}],{}]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],neckQ[#]&&Union[Total/@subalt[#]]==Range[n]&]],{n,15}]
A350103
Triangle read by rows. Number of self-measuring subsets of the initial segment of the natural numbers strictly below n and cardinality k. Number of subsets S of [n] with S = distset(S) and |S| = k.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 4, 2, 1, 1, 1, 1, 5, 2, 1, 1, 1, 1, 1, 6, 3, 2, 1, 1, 1, 1, 1, 7, 3, 2, 1, 1, 1, 1, 1, 1, 8, 4, 2, 2, 1, 1, 1, 1, 1, 1, 9, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 11, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1
Offset: 0
Triangle starts:
[ 0] [1]
[ 1] [1, 1]
[ 2] [1, 1, 1]
[ 3] [1, 1, 2, 1]
[ 4] [1, 1, 3, 1, 1]
[ 5] [1, 1, 4, 2, 1, 1]
[ 6] [1, 1, 5, 2, 1, 1, 1]
[ 7] [1, 1, 6, 3, 2, 1, 1, 1]
[ 8] [1, 1, 7, 3, 2, 1, 1, 1, 1]
[ 9] [1, 1, 8, 4, 2, 2, 1, 1, 1, 1]
[10] [1, 1, 9, 4, 3, 2, 1, 1, 1, 1, 1]
[11] [1, 1, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1]
[12] [1, 1, 11, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1]
.
The first column is 1,1,... because {} = distset({}) and |{}| = 0.
The second column is 1,1,... because {0} = distset({0}) and |{0}| = 1.
The third column is n-1 because {0, j} = distset({0, j}) and |{0, j}| = 2 for j = 1..n - 1.
The main diagonal is 1,1,... because [n] = distset([n]) and |[n]| = n (these are the complete rulers A103295).
-
T := (n, k) -> ifelse(k < 2, 1, floor((n - 1) / (k - 1))):
seq(print(seq(T(n, k), k = 0..n)), n = 0..12);
-
distSet[s_] := Union[Map[Abs[Differences[#][[1]]] &, Union[Sort /@ Tuples[s, 2]]]]; T[n_, k_] := Count[Subsets[Range[0, n - 1]], ?((ds = distSet[#]) == # && Length[ds] == k &)]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* _Amiram Eldar, Dec 16 2021 *)
-
T(n, k) = if(k<=1, 1, (n - 1) \ (k - 1)) \\ Winston de Greef, Jan 31 2024
-
# generating and counting (slow)
def isSelfMeasuring(R):
S, L = Set([]), len(R)
R = Set([r - 1 for r in R])
for i in range(L):
for j in (0..i):
S = S.union(Set([abs(R[i] - R[i - j])]))
return R == S
def A349976row(n):
counter = [0] * (n + 1)
for S in Subsets(n):
if isSelfMeasuring(S): counter[len(S)] += 1
return counter
for n in range(10): print(A349976row(n))
A103296
Number of complete rulers with n segments.
Original entry on oeis.org
1, 1, 3, 10, 38, 175, 885, 5101, 32080, 219569, 1616882, 12747354, 106948772, 950494868
Offset: 0
a(2)=3 counts the complete rulers with 2 segments, {[0,1,2],[0,1,3],[0,2,3]}.
Cf.
A103301 (perfect rulers with n segments),
A103299 (optimal rulers with n segments).
A326021
Number of complete subsets of {1..n} with maximum n.
Original entry on oeis.org
1, 1, 1, 2, 3, 6, 12, 23, 45, 90, 180, 359, 717, 1432, 2862, 5723, 11444, 22887, 45772, 91541, 183078, 366151, 732295, 1464583, 2929158, 5858307, 11716603, 23433196, 46866379, 93732744, 187465471, 374930922, 749861819, 1499723610
Offset: 1
The a(1) = 1 through a(7) = 12 subsets:
{1} {1,2} {1,2,3} {1,2,4} {1,2,3,5} {1,2,3,6} {1,2,3,7}
{1,2,3,4} {1,2,4,5} {1,2,4,6} {1,2,4,7}
{1,2,3,4,5} {1,2,3,4,6} {1,2,3,4,7}
{1,2,3,5,6} {1,2,3,5,7}
{1,2,4,5,6} {1,2,3,6,7}
{1,2,3,4,5,6} {1,2,4,5,7}
{1,2,4,6,7}
{1,2,3,4,5,7}
{1,2,3,4,6,7}
{1,2,3,5,6,7}
{1,2,4,5,6,7}
{1,2,3,4,5,6,7}
-
Table[Length[Select[Subsets[Range[n]],Max@@#==n&&Union[Plus@@@Subsets[#]]==Range[0,Total[#]]&]],{n,10}]
A326022
Number of minimal complete subsets of {1..n} with maximum n.
Original entry on oeis.org
1, 1, 1, 1, 2, 2, 2, 4, 8, 8, 8, 10, 14, 25, 40, 49, 62
Offset: 1
The a(3) = 1 through a(9) = 8 subsets:
{1,2,3} {1,2,4} {1,2,3,5} {1,2,3,6} {1,2,3,7} {1,2,4,8} {1,2,3,4,9}
{1,2,4,5} {1,2,4,6} {1,2,4,7} {1,2,3,5,8} {1,2,3,5,9}
{1,2,3,6,8} {1,2,3,6,9}
{1,2,3,7,8} {1,2,3,7,9}
{1,2,4,5,9}
{1,2,4,6,9}
{1,2,4,7,9}
{1,2,4,8,9}
-
fasmin[y_]:=Complement[y,Union@@Table[Union[s,#]&/@Rest[Subsets[Complement[Union@@y,s]]],{s,y}]];
Table[Length[fasmin[Select[Subsets[Range[n]],Max@@#==n&&Union[Plus@@@Subsets[#]]==Range[0,Total[#]]&]]],{n,10}]
A325764
Heinz numbers of integer partitions whose distinct consecutive subsequences have distinct sums that cover an initial interval of positive integers.
Original entry on oeis.org
1, 2, 4, 6, 8, 16, 18, 20, 32, 54, 56, 64, 100, 128, 162, 176, 256, 392, 416, 486, 500, 512, 1024, 1088, 1458, 1936, 2048, 2432, 2500, 2744, 4096, 4374, 5408, 5888, 8192, 12500, 13122, 14848, 16384, 18496, 19208, 21296, 31744, 32768, 39366, 46208, 62500, 65536
Offset: 1
The sequence of terms together with their prime indices begins:
1: {}
2: {1}
4: {1,1}
6: {1,2}
8: {1,1,1}
16: {1,1,1,1}
18: {1,2,2}
20: {1,1,3}
32: {1,1,1,1,1}
54: {1,2,2,2}
56: {1,1,1,4}
64: {1,1,1,1,1,1}
100: {1,1,3,3}
128: {1,1,1,1,1,1,1}
162: {1,2,2,2,2}
176: {1,1,1,1,5}
256: {1,1,1,1,1,1,1,1}
392: {1,1,1,4,4}
416: {1,1,1,1,1,6}
486: {1,2,2,2,2,2}
500: {1,1,3,3,3}
512: {1,1,1,1,1,1,1,1,1}
Cf.
A002033,
A056239,
A103295,
A103300,
A112798,
A143823,
A169942,
A325676,
A325685,
A325763,
A325765,
A325769,
A325770.
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Select[Range[1000],UnsameQ@@Total/@Union[ReplaceList[primeMS[#],{_,s__,_}:>{s}]]&&Range[Total[primeMS[#]]]==Union[ReplaceList[primeMS[#],{_,s__,_}:>Plus[s]]]&]
A334268
Number of compositions of n where every distinct subsequence (not necessarily contiguous) has a different sum.
Original entry on oeis.org
1, 1, 2, 4, 5, 10, 10, 24, 24, 43, 42, 88, 72, 136, 122, 242, 213, 392, 320, 630, 490, 916, 742, 1432, 1160, 1955, 1604, 2826, 2310, 3850, 2888, 5416, 4426, 7332, 5814, 10046, 7983, 12946, 10236, 17780, 14100, 22674, 17582, 30232, 23674, 37522, 29426, 49832
Offset: 0
The a(1) = 1 through a(6) = 19 compositions:
(1) (2) (3) (4) (5) (6)
(1,1) (1,2) (1,3) (1,4) (1,5)
(2,1) (2,2) (2,3) (2,4)
(1,1,1) (3,1) (3,2) (3,3)
(1,1,1,1) (4,1) (4,2)
(1,1,3) (5,1)
(1,2,2) (1,1,4)
(2,2,1) (2,2,2)
(3,1,1) (4,1,1)
(1,1,1,1,1) (1,1,1,1,1,1)
These compositions are ranked by
A334967.
Compositions where every restriction to a subinterval has a different sum are counted by
A169942 and
A325677 and ranked by
A333222. The case of partitions is counted by
A325768 and ranked by
A325779.
Positive subset-sums of partitions are counted by
A276024 and
A299701.
Knapsack compositions are counted by
A325676 and
A325687 and ranked by
A333223. The case of partitions is counted by
A325769 and ranked by
A325778, for which the number of distinct consecutive subsequences is given by
A325770.
-
b:= proc(n, s) option remember; `if`(n=0, 1, add((h->
`if`(nops(h)=nops(map(l-> add(i, i=l), h)),
b(n-j, h), 0))({s[], map(l-> [l[], j], s)[]}), j=1..n))
end:
a:= n-> b(n, {[]}):
seq(a(n), n=0..23); # Alois P. Heinz, Jun 03 2020
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@Total/@Union[Subsets[#]]&]],{n,0,15}]
A376423
Nonnegative numbers m such that the run lengths in binary expansion of m, say (r_1, ..., r_k), correspond to a complete ruler: the sums r_i + ... r_j with i <= j <= k cover an initial interval of the positive integers.
Original entry on oeis.org
0, 1, 2, 4, 5, 6, 9, 10, 11, 13, 18, 19, 20, 21, 22, 23, 25, 26, 29, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 49, 50, 53, 54, 58, 68, 69, 70, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 98, 101, 102, 105, 106, 109
Offset: 1
The binary expansion of 35 is "100011", the corresponding run lengths are (1, 3, 2); the sums 1, 2, 3, 1+3, 3+2, 1+3+2 cover the positive integers between 1 and 6, hence 35 is a term.
-
toruns(n) = { my (r = []); while (n, my (v = valuation(n+n%2, 2)); n \= 2^v; r = concat(v, r)); r }
is(n) = { my (r = toruns(n)); #setbinop((i, j) -> vecsum(r[i..j]), [1..#r])==vecsum(r); }
Comments