A053419
Number of graphs with loops (symmetric relations) with n edges.
Original entry on oeis.org
1, 2, 5, 14, 38, 107, 318, 972, 3111, 10410, 36371, 132656, 504636, 1998361, 8224448, 35112342, 155211522, 709123787, 3342875421, 16234342515, 81102926848, 416244824068, 2192018373522, 11831511359378, 65387590986455, 369661585869273, 2135966349269550, 12604385044890628
Offset: 0
Cf.
A000664,
A000666,
A007716,
A007717,
A020555,
A050535,
A053419,
A094574,
A191970 (multisets),
A316974,
A339063.
A322770
Array read by upwards antidiagonals: T(m,n) = number of set partitions into distinct parts of the multiset consisting of one copy each of x_1, x_2, ..., x_m, and two copies each of y_1, y_2, ..., y_n, for m >= 0, n >= 0.
Original entry on oeis.org
1, 1, 1, 2, 3, 5, 5, 9, 18, 40, 15, 31, 70, 172, 457, 52, 120, 299, 801, 2295, 6995, 203, 514, 1393, 4025, 12347, 40043, 136771, 877, 2407, 7023, 21709, 70843, 243235, 875936, 3299218, 4140, 12205, 38043, 124997, 431636, 1562071, 5908978, 23308546, 95668354
Offset: 0
The array begins:
1, 1, 5, 40, 457, 6995, 136771, ...
1, 3, 18, 172, 2295, 40043, 875936, ...
2, 9, 70, 801, 12347, 243235, 5908978, ...
5, 31, 299, 4025, 70843, 1562071, 41862462, ...
15, 120, 1393, 21709, 431636, 10569612, 310606617, ...
52, 514, 7023, 124997, 2781372, 75114998, 2407527172, ...
203, 2407, 38043, 764538, 18885177, 559057663, 19449364539, ...
...
- D. E. Knuth, The Art of Computer Programming, Vol. 4A, Table A-1, page 778. (Background information.)
-
B := n -> combinat[bell](n):
Q := proc(m,n) local k; global B; option remember;
if n = 0 then B(m) else
(1/2)*( Q(m+2,n-1) + Q(m+1,n-1) - add( binomial(n-1,k)*Q(m,k), k=0..n-1) ); fi; end; # Q(m,n) (which is Knuth's notation) is T(m,n)
-
Q[m_, n_] := Q[m, n] = If[n == 0, BellB[m], (1/2)(Q[m+2, n-1] + Q[m+1, n-1] - Sum[Binomial[n-1, k] Q[m, k], {k, 0, n-1}])];
Table[Q[m-n, n], {m, 0, 8}, {n, 0, m}] // Flatten (* Jean-François Alcover, Jan 02 2019, from Maple *)
A316972
Number of connected multiset partitions of {1, 1, 2, 2, 3, 3, ..., n, n}.
Original entry on oeis.org
1, 2, 5, 28, 277, 3985, 76117, 1833187, 53756682, 1871041538, 75809298105, 3521419837339, 185235838688677, 10923147890901151, 715989783027216302, 51793686238309903860, 4109310551278549543317, 355667047514571431358297, 33422937748872646130124797
Offset: 0
The a(2) = 5 connected multiset partitions of {1, 1, 2, 2} are (1122), (1)(122), (2)(112), (12)(12), (1)(2)(12). The multiset partitions (11)(22), (1)(1)(22), (2)(2)(11), (1)(1)(2)(2) are not connected.
-
nn=10;
ser=Exp[-3/2+Exp[x]/2]*Sum[Exp[Binomial[n+1,2]*x]/n!,{n,0,3*nn}];
Round/@(CoefficientList[Series[1+Log[ser],{x,0,nn}],x]*Array[Factorial,nn+1,0]) (* based on Jean-François Alcover after Vladeta Jovovic *)
(*second program *)
csm[s_]:=With[{c=Select[Tuples[Range[Length[s]],2],And[OrderedQ[#],UnsameQ@@#,Length[Intersection@@s[[#]]]>0]&]},If[c=={},s,csm[Union[Append[Delete[s,List/@c[[1]]],Union@@s[[c[[1]]]]]]]]];
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
Length/@Table[Select[mps[Ceiling[Range[1/2,n,1/2]]],Length[csm[#]]==1&],{n,4}]
A178165
Number of unordered collections of distinct nonempty subsets of an n-element set where each element appears in at most 2 subsets.
Original entry on oeis.org
1, 2, 8, 59, 652, 9736, 186478, 4421018, 126317785, 4260664251, 166884941780, 7489637988545, 380861594219460, 21739310882945458, 1381634777325000263, 97089956842985393297, 7497783115765911443879, 632884743974716421132084
Offset: 0
-
terms = m = 30;
a094577[n_] := Sum[Binomial[n, k]*BellB[2n-k], {k, 0, n}];
egf = Exp[(1 - Exp[x])/2]*Sum[a094577[n]*(x/2)^n/n!, {n, 0, m}] + O[x]^m;
A094574 = CoefficientList[egf + O[x]^m, x]*Range[0, m-1]!;
a[n_] := Sum[Binomial[n, k]*A094574[[k+1]], {k, 0, n}];
Table[a[n], {n, 0, m-1}] (* Jean-François Alcover, May 24 2019 *)
-
from numpy import array
def toBinary(n, k):
ans=[]
for i in range(k):
ans.insert(0, n%2)
n=n>>1
return array(ans)
def powerSet(k): return [toBinary(n,k) for n in range(1,2**k)]
def courcelle(maxUses, remainingSets, exact=False):
if exact and not all(maxUses<=sum(remainingSets)): ans=0
elif len(remainingSets)==0: ans=1
else:
set0=remainingSets[0]
if all(set0<=maxUses): ans=courcelle(maxUses-set0,remainingSets[1:],exact=exact)
else: ans=0
ans+=courcelle(maxUses,remainingSets[1:],exact=exact)
return ans
for i in range(10):
print(i, courcelle(array([2]*i),powerSet(i),exact=False))
A331316
Number of nonnegative integer matrices with n distinct columns and any number of distinct nonzero rows with each column sum being 2 and rows in decreasing lexicographic order.
Original entry on oeis.org
1, 1, 4, 27, 266, 3599, 62941, 1372117, 36248765, 1135864306, 41501271477, 1743624004536, 83268125043937, 4476101995389591, 268589319338401864, 17860954789864760357, 1307982591075162739660, 104895999816356419875935, 9166919404389461922512723
Offset: 0
The a(2) = 4 matrices are:
[2 1] [2 0] [1 2] [1 1]
[0 1] [0 2] [1 0] [1 0]
[0 1]
A094573
Triangle T(n,k) giving number of (<=2)-covers of an n-set with k blocks.
Original entry on oeis.org
1, 1, 1, 3, 1, 1, 12, 20, 7, 1, 39, 169, 186, 59, 3, 1, 120, 1160, 2755, 2243, 661, 55, 1, 363, 7381, 33270, 52060, 33604, 9167, 910, 15, 1, 1092, 45500, 367087, 988750, 1126874, 601262, 151726, 16401, 525, 1, 3279, 276529, 3873786, 17005149
Offset: 0
Triangle T(n,k) begins:
1;
1;
1, 3, 1;
1, 12, 20, 7;
1, 39, 169, 186, 59, 3;
1, 120, 1160, 2755, 2243, 661, 55;
...
-
rows = 9; m = rows + 2;
egf = Exp[-x - (x^2/2)*(Exp[y]-1)]*Sum[Exp[y*Binomial[n+1, 2]]*(x^n/n!), {n, 0, m}];
cc = CoefficientList[# + O[x]^m, x]& /@ CoefficientList[egf + O[y]^m, y];
(Range[0, Length[cc]-1]! * cc)[[1 ;; rows]] /. {0, a__} :> {a} // Flatten (* Jean-François Alcover, May 13 2019 *)
A316892
Number of non-isomorphic strict multiset partitions of {1, 1, 2, 2, 3, 3, ..., n, n} with no equivalent vertices.
Original entry on oeis.org
1, 1, 3, 9, 24, 69, 211, 654
Offset: 0
Non-isomorphic representatives of the a(3) = 9 strict multiset partitions:
(112)(233)
(1)(2)(1233)
(1)(12)(233)
(2)(11)(233)
(11)(22)(33)
(12)(13)(23)
(1)(2)(3)(123)
(1)(2)(12)(33)
(1)(2)(13)(23)
A316977
Number of series-reduced rooted trees whose leaves are {1, 1, 2, 2, 3, 3, ..., n, n}.
Original entry on oeis.org
1, 12, 575, 66080, 13830706, 4566898564, 2181901435364, 1422774451251512, 1213875872220833664, 1312273759143855989808, 1752860078230602866012288, 2834766624822130489716563008, 5458358420687156358967526721408, 12339106957086349462329140342122112
Offset: 1
The a(2) = 12 trees are (1(1(22))), (1(2(12))), (1(122)), (2(1(12))), (2(2(11))), (2(112)), ((11)(22)), ((12)(12)), (11(22)), (12(12)), (22(11)), (1122).
-
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
gro[m_]:=If[Length[m]==1,m,Union[Sort/@Join@@(Tuples[gro/@#]&/@Select[mps[m],Length[#]>1&])]];
Table[Length[gro[Ceiling[Range[1/2,n,1/2]]]],{n,4}]
-
\\ See links in A339645 for combinatorial species functions.
cycleIndexSeries(n)={my(v=vector(2*n), vars=vector(2*n-2,i,sv(2+i))); v[1]=sv(1); for(n=2, #v, v[n] = substvec(polcoef( sExp(x*Ser(v[1..n])), n ), vars[1..n-2], vector(n-2))); sCartProd(x*Ser(v), 1/(1-x^2*symGroupCycleIndex(2)) + O(x*x^(2*n)))}
seq(n)={my(p=substvec(cycleIndexSeries(n), [sv(1), sv(2)], [1,1])); vector(n, n, polcoef(p,2*n))} \\ Andrew Howroyd, Jan 02 2021
Comments