A066062
Number of subsets S of T={0,1,2,...,n} such that each element of T is the sum of two (not necessarily distinct) elements of S.
Original entry on oeis.org
1, 1, 2, 3, 6, 10, 20, 37, 73, 139, 275, 533, 1059, 2075, 4126, 8134, 16194, 32058, 63910, 126932, 253252, 503933, 1006056, 2004838, 4004124, 7987149, 15957964, 31854676, 63660327, 127141415, 254136782, 507750109, 1015059238, 2028564292, 4055812657, 8107052520
Offset: 0
For n=2, the definition obviously requires that S contain both 0 and 1. The only subsets of {0,1,2} that do this are {0,1} and {0,1,2}. For both of these, we have 0=0+0, 1=0+1, 2=1+1, so a(2)=2.
- Martin Fuller, Table of n, a(n) for n = 0..65
- S. R. Finch, Monoids of natural numbers, March 17, 2009. [Cached copy, with permission of the author]
- G. Grekos, L. Haddad, C. Helou, and J. Pihko, On the Erdos-Turán conjecture, J. Number Theory 102 (2003), no. 2, 339-352.
- J. Marzuola and A. Miller, Counting numerical sets with no small atoms, arXiv:0805.3493 [math.CO], 2008. - _Steven Finch_, Mar 15 2009
- J. Marzuola and A. Miller, Counting numerical sets with no small atoms, J. Combin. Theory A 117 (6) (2010) 650-667.
-
See Martin Fuller link in A158449
-
a[n_] := Module[{},
T = Range[0, n];
ST = Subsets[T, {Floor[n^(2/3)], n+1}];
selQ[S_] := Intersection[T, Total /@ Tuples[S, {2}]] == T;
SST = Select[ST, selQ]; min = Min[Length /@ SST];
SST // Length
];
Table[an = a[n]; Print["a(", n, ") = ", an, " min = ", min]; an, {n, 0, 24}] (* Jean-François Alcover, Nov 05 2018 *)
-
def sums(s): return set((si+sj) for i, si in enumerate(s) for sj in s[i:])
def b(i, n, s):
if sums(s) >= set(range(n+1)): return 2**(n+1-i)
if i > n: return 0
return b(i+1, n, s) + b(i+1, n, s+[i])
def a(n): return b(0, n, [])
print([a(n) for n in range(15)]) # Michael S. Branicky, Jan 15 2022
A158448
a(n) equals the number of admissible pairs of subsets of {1,2,...,n} in the notation of Marzuola-Miller.
Original entry on oeis.org
1, 2, 3, 8, 18, 50, 135, 385, 1065, 3053, 8701, 25579, 73693, 217718, 635220, 1888802
Offset: 1
a(3)=3 since {0,4,8,9,10,11,...}, {0,1,4,5,8,9,10,11,...} and {0,1,2, 4,5,6,8,9,10,11,...} are the only three sets satisfying the required conditions.
- S. R. Finch, Monoids of natural numbers
- S. R. Finch, Monoids of natural numbers, March 17, 2009. [Cached copy, with permission of the author]
- J. Marzuola and A. Miller, Counting numerical sets with no small atoms, arXiv:0805.3493 [math.CO], 2008.
- J. Marzuola and A. Miller, Counting numerical sets with no small atoms, J. Combin. Theory A 117 (6) (2010) 650-667.
Definition rephrased by Jeremy L. Marzuola (marzuola(AT)math.uni-bonn.de), Aug 08 2009
A228117
Number of partitions of n that have hookset {1,2,...,k} for some k.
Original entry on oeis.org
1, 1, 2, 2, 3, 4, 4, 6, 7, 9, 10, 16, 14, 23, 24, 33, 33, 50, 50, 71, 75, 101, 103, 146, 151, 201, 211, 280, 292, 389, 409, 519, 573, 707, 765, 960, 1043, 1276, 1393, 1704, 1870, 2258, 2483, 2970, 3281, 3920, 4290, 5101, 5659, 6640, 7318, 8628, 9506, 11081
Offset: 0
a(7) = 6, counting the partitions (7), (43), (331), (322), (2221), and (111111). The hooklengths of (7) are {1,2,3,4,5,6,7}, and the hooklengths of (322) are {1,1,2,2,3,4,5}.
Cf.
A158291, the number of partitions which have hookset {1,2,...,n}, not counting multiplicities.
-
h:= proc(l) local n, s; n:=nops(l); s:= {seq(seq(1+l[i]-j
+add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)};
`if`(s={$1..max(s[], 0)}, 1, 0)
end:
g:= (n, i, l)-> `if`(n=0 or i=1, h([l[], 1$n]), `if`(i<1, 0,
g(n, i-1, l)+`if`(i>n, 0, g(n-i, i, [l[], i])))):
a:= n-> g(n$2, []):
seq(a(n), n=0..30); # Alois P. Heinz, Aug 12 2013
-
<< "Combinatorica`"
HookSet[Lambda_] := Module[{i, j, k, HookHolder},
HookHolder = {};
HS = {};
For[i = 1, i < Length[Lambda] + 1, i++,
For[j = 1, j < Lambda[[i]] + 1, j++,
CurrentHook =
Lambda[[i]] - j + TransposePartition[Lambda][[j]] - i + 1;
If[! MemberQ[HS, CurrentHook],
HookHolder = Append[HS, CurrentHook]; HS = HookHolder]
]
];
HookHolder = Sort[HS];
HS = HookHolder;
Return[HS]]
For[i = 1, i < 31, i++,
For[j = 1, j < PartitionsP[i] + 1, j++,
CurrSet=HookSet[Partitions[i][[j]]];
If[CurrSet == Table[i,{i,1,Length[CurrSet]}],
SGFHolder = SegGenFn + q^i;
SegGenFn = SGFHolder]
]
]
(* second program: *)
h[l_] := Module[{n, s}, n = Length[l]; s = Table[Table[1 + l[[i]] - j + Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}] // Flatten // Union; If[s == Range[Max[Append[s, 0]]], 1, 0]]; g[n_, i_, l_] := g[n, i, l] = If[n == 0 || i == 1, h[Join[l, Array[1&, n]]], If[i<1, 0, g[n, i-1, l] + If[i>n, 0, g[n-i, i, Append[l, i]]]]]; a[n_] := g[n, n, {}]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 60}] (* Jean-François Alcover, Jan 22 2016, after Alois P. Heinz *)
Showing 1-3 of 3 results.
Comments