cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-9 of 9 results.

A368598 Number of non-isomorphic n-element sets of singletons or pairs of elements of {1..n}, or unlabeled loop-graphs with n edges and up to n vertices.

Original entry on oeis.org

1, 1, 2, 6, 17, 52, 173, 585, 2064, 7520, 28265, 109501, 437394, 1799843, 7629463, 33302834, 149633151, 691702799, 3287804961, 16058229900, 80533510224, 414384339438, 2185878202630, 11811050484851, 65318772618624, 369428031895444, 2135166786135671, 12601624505404858
Offset: 0

Views

Author

Gus Wiseman, Jan 05 2024

Keywords

Comments

It doesn't matter for this sequence whether we use loops such as {x,x} or half-loops such as {x}.

Examples

			Non-isomorphic representatives of the a(0) = 1 through a(4) = 17 set-systems:
  {}  {{1}}  {{1},{2}}    {{1},{2},{3}}        {{1},{2},{3},{4}}
             {{1},{1,2}}  {{1},{2},{1,2}}      {{1},{2},{3},{1,2}}
                          {{1},{2},{1,3}}      {{1},{2},{3},{1,4}}
                          {{1},{1,2},{1,3}}    {{1},{2},{1,2},{1,3}}
                          {{1},{1,2},{2,3}}    {{1},{2},{1,2},{3,4}}
                          {{1,2},{1,3},{2,3}}  {{1},{2},{1,3},{1,4}}
                                               {{1},{2},{1,3},{2,3}}
                                               {{1},{2},{1,3},{2,4}}
                                               {{1},{3},{1,2},{2,4}}
                                               {{1},{1,2},{1,3},{1,4}}
                                               {{1},{1,2},{1,3},{2,3}}
                                               {{1},{1,2},{1,3},{2,4}}
                                               {{1},{1,2},{2,3},{3,4}}
                                               {{2},{1,2},{1,3},{1,4}}
                                               {{4},{1,2},{1,3},{2,3}}
                                               {{1,2},{1,3},{1,4},{2,3}}
                                               {{1,2},{1,3},{2,4},{3,4}}
		

Crossrefs

For any number of edges of any size we have A000612, covering A055621.
For any number of edges we have A000666, A054921, A322700.
The labeled version is A014068.
Counting by weight gives A320663, or A339888 with loops {x,x}.
The covering case is A368599.
For edges of any size we have A368731, covering A368186.
Row sums of A368836.
A000085 counts set partitions into singletons or pairs.
A001515 counts length-n set partitions into singletons or pairs.
A100861 counts set partitions into singletons or pairs by number of pairs.
A111924 counts set partitions into singletons or pairs by length.

Programs

  • Mathematica
    brute[m_]:=First[Sort[Table[Sort[Sort /@ (m/.Rule@@@Table[{(Union@@m)[[i]],p[[i]]}, {i,Length[p]}])], {p,Permutations[Range[Length[Union@@m]]]}]]];
    Table[Length[Union[brute /@ Subsets[Subsets[Range[n],{1,2}],{n}]]],{n,0,5}]
  • PARI
    a(n) = polcoef(G(n, O(x*x^n)), n) \\ G defined in A070166. - Andrew Howroyd, Jan 09 2024

Formula

a(n) = A070166(n, n). - Andrew Howroyd, Jan 09 2024

Extensions

Terms a(7) and beyond from Andrew Howroyd, Jan 09 2024

A368599 Number of non-isomorphic n-element sets of singletons or pairs of elements of {1..n} with union {1..n}, or unlabeled loop-graphs with n edges covering n vertices.

Original entry on oeis.org

1, 1, 2, 5, 13, 34, 97, 277, 825, 2486, 7643, 23772, 74989, 238933, 769488, 2500758, 8199828, 27106647, 90316944, 303182461, 1025139840, 3490606305, 11967066094, 41302863014, 143493606215, 501772078429, 1765928732426, 6254738346969, 22294413256484, 79968425399831
Offset: 0

Views

Author

Gus Wiseman, Jan 06 2024

Keywords

Comments

It doesn't matter for this sequence whether we use loops such as {x,x} or half-loops such as {x}.

Examples

			The a(0) = 1 through a(4) = 13 set-systems:
  {}  {{1}}  {{1},{2}}    {{1},{2},{3}}        {{1},{2},{3},{4}}
             {{1},{1,2}}  {{1},{2},{1,3}}      {{1},{2},{3},{1,4}}
                          {{1},{1,2},{1,3}}    {{1},{2},{1,2},{3,4}}
                          {{1},{1,2},{2,3}}    {{1},{2},{1,3},{1,4}}
                          {{1,2},{1,3},{2,3}}  {{1},{2},{1,3},{2,4}}
                                               {{1},{2},{1,3},{3,4}}
                                               {{1},{1,2},{1,3},{1,4}}
                                               {{1},{1,2},{1,3},{2,4}}
                                               {{1},{1,2},{2,3},{2,4}}
                                               {{1},{1,2},{2,3},{3,4}}
                                               {{1},{2,3},{2,4},{3,4}}
                                               {{1,2},{1,3},{1,4},{2,3}}
                                               {{1,2},{1,3},{2,4},{3,4}}
		

Crossrefs

For any number of edges we have A000666, A054921, A322700.
For any number of edges of any size we have A055621, non-covering A000612.
For edges of any size we have A368186, covering case of A368731.
The labeled version is A368597, covering case of A014068.
This is the covering case of A368598.
A000085 counts set partitions into singletons or pairs.
A001515 counts length-n set partitions into singletons or pairs.
A100861 counts set partitions into singletons or pairs by number of pairs.
A111924 counts set partitions into singletons or pairs by length.

Programs

  • Mathematica
    brute[m_]:=First[Sort[Table[Sort[Sort /@ (m/.Rule@@@Table[{(Union@@m)[[i]],p[[i]]}, {i,Length[p]}])], {p,Permutations[Range[Length[Union@@m]]]}]]];
    Table[Length[Union[brute /@ Select[Subsets[Subsets[Range[n],{1,2}],{n}], Union@@#==Range[n]&]]],{n,0,5}]
  • PARI
    a(n) = polcoef(G(n, O(x*x^n)) - if(n, G(n-1, O(x*x^n))), n) \\ G defined in A070166. - Andrew Howroyd, Jan 09 2024

Formula

a(n) = A070166(n,n) - A070166(n-1,n) for n > 0. - Andrew Howroyd, Jan 09 2024

Extensions

Terms a(7) and beyond from Andrew Howroyd, Jan 09 2024

A370169 Number of unlabeled loop-graphs covering n vertices with at most n edges.

Original entry on oeis.org

1, 1, 3, 7, 19, 48, 135, 373, 1085, 3184, 9590, 29258, 90833, 285352, 908006, 2919953, 9487330, 31111997, 102934602, 343389708, 1154684849, 3912345408, 13353796977, 45906197103, 158915480378, 553897148543, 1943627750652, 6865605601382, 24411508473314, 87364180212671, 314682145679491
Offset: 0

Views

Author

Gus Wiseman, Feb 16 2024

Keywords

Examples

			The a(0) = 1 through a(4) = 19 loop-graph edge sets (loops shown as singletons):
  {}  {{1}}  {{1,2}}      {{1},{2,3}}          {{1,2},{3,4}}
             {{1},{2}}    {{1,2},{1,3}}        {{1},{2},{3,4}}
             {{1},{1,2}}  {{1},{2},{3}}        {{1},{1,2},{3,4}}
                          {{1},{2},{1,3}}      {{1},{2,3},{2,4}}
                          {{1},{1,2},{1,3}}    {{1},{2},{3},{4}}
                          {{1},{1,2},{2,3}}    {{1,2},{1,3},{1,4}}
                          {{1,2},{1,3},{2,3}}  {{1,2},{1,3},{2,4}}
                                               {{1},{2},{3},{1,4}}
                                               {{1},{2},{1,2},{3,4}}
                                               {{1},{2},{1,3},{1,4}}
                                               {{1},{2},{1,3},{2,4}}
                                               {{1},{2},{1,3},{3,4}}
                                               {{1},{1,2},{1,3},{1,4}}
                                               {{1},{1,2},{1,3},{2,4}}
                                               {{1},{1,2},{2,3},{2,4}}
                                               {{1},{1,2},{2,3},{3,4}}
                                               {{1},{2,3},{2,4},{3,4}}
                                               {{1,2},{1,3},{1,4},{2,3}}
                                               {{1,2},{1,3},{2,4},{3,4}}
		

Crossrefs

The case of equality is A368599, covering case of A368598.
The labeled version is A369194, covering case of A066383.
This is the covering case of A370168.
The loopless version is the covering case of A370315, labeled A369192.
This is the loopless version is A370316, labeled A369191.
A006125 counts graphs, unlabeled A000088.
A006129 counts covering graphs, unlabeled A002494.
A322661 counts covering loop-graphs, unlabeled A322700.

Programs

  • Mathematica
    brute[m_]:=First[Sort[Table[Sort[Sort /@ (m/.Rule@@@Table[{(Union@@m)[[i]],p[[i]]},{i,Length[p]}])], {p,Permutations[Range[Length[Union@@m]]]}]]];
    Table[Length[Union[brute /@ Select[Subsets[Subsets[Range[n],{1,2}]], Union@@#==Range[n]&&Length[#]<=n&]]],{n,0,5}]
  • PARI
    \\ G defined in A070166.
    a(n)=my(A=O(x*x^n)); if(n==0, 1, polcoef((G(n,A)-G(n-1,A))/(1-x), n)) \\ Andrew Howroyd, Feb 19 2024

Extensions

a(7) onwards from Andrew Howroyd, Feb 19 2024

A052283 Triangle read by rows: T(n,k) is the number of unlabeled directed graphs on n nodes with k arcs, k=0..n*(n-1).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1, 5, 13, 27, 38, 48, 38, 27, 13, 5, 1, 1, 1, 1, 5, 16, 61, 154, 379, 707, 1155, 1490, 1670, 1490, 1155, 707, 379, 154, 61, 16, 5, 1, 1, 1, 1, 5, 17, 76, 288, 1043, 3242, 8951, 21209, 43863, 78814, 124115, 171024, 207362, 220922, 207362, 171024, 124115, 78814, 43863, 21209, 8951, 3242, 1043, 288, 76, 17, 5, 1, 1
Offset: 0

Views

Author

Vladeta Jovovic, Feb 07 2000

Keywords

Comments

Triangular array read by rows T(n,k) is the number of unlabeled directed graphs (no self loops allowed) on n nodes with exactly k edges where n >= 1, 0 <= k <= n(n-1). - Geoffrey Critzer, Nov 01 2011

Examples

			[1],
[1],
[1,1,1],
[1,1,4,4,4,1,1],
[1,1,5,13,27,38,48,38,27,13,5,1,1];
(the last batch giving the numbers of directed graphs with 4 nodes and from 0 to 12 arcs).
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 247.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 522.

Crossrefs

Cf. A000273 (row sums), A070166, A008406, A003085, A283753 (weakly connected).

Programs

  • Mathematica
    Table[CoefficientList[GraphPolynomial[n, x, Directed], x], {n, 1, 10}] (* Geoffrey Critzer, Nov 01 2011 *)
    permcount[v_] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
    edges[v_, t_] := Product[g = GCD[v[[i]], v[[j]]]; t[v[[i]]*v[[j]]/g]^(2 g), {i, 2, Length[v]}, {j, 1, i-1}] * Product[ t[v[[i]]]^(v[[i]] - 1), {i, 1, Length[v]}];
    gp[n_] := (s = 0; Do[s += permcount[p]*edges[p, 1 + x^# &], {p, IntegerPartitions[n]}]; s/n!);
    A052283 = Reap[For[n = 1, n <= 6, n++, p = gp[n]; For[k = 0, k <= Exponent[p, x], k++, Sow[Coefficient[p, x, k]]]]][[2, 1]] (* Jean-François Alcover, Jul 09 2018, after Andrew Howroyd *)
  • PARI
    permcount(v) = {my(m=1,s=0,k=0,t); for(i=1,#v,t=v[i]; k=if(i>1&&t==v[i-1],k+1,1); m*=t*k;s+=t); s!/m}
    edges(v,t) = {prod(i=2, #v, prod(j=1, i-1, my(g=gcd(v[i],v[j])); t(v[i]*v[j]/g)^(2*g))) * prod(i=1, #v, t(v[i])^(v[i]-1))}
    gp(n) = {my(s=0); forpart(p=n, s+=permcount(p)*edges(p,i->1+x^i)); s/n!}
    for(n=1, 6, my(p=gp(n)); for(k=0, poldegree(p), print1(polcoeff(p,k), ", ")); print); \\ Andrew Howroyd, Nov 05 2017

Formula

T(n,0) = T(n,1) = T(n,n(n-1)-1) = T(n,n) = 1. - Geoffrey Critzer, Nov 01 2011
T(2k,k) = T(2k+1,k) = T(2k+2,k) =... and is the maximum value of column k. - Geoffrey Critzer, Nov 01 2011

Extensions

a(0)=1 prepended and terms a(62) and beyond from Andrew Howroyd, Apr 20 2020

A320395 Number of non-isomorphic 3-uniform multiset systems over {1,...,n}.

Original entry on oeis.org

1, 2, 10, 208, 45960, 287800704, 100103176111616, 3837878984050795692032, 32966965900633495618246298767360, 128880214965936601447070466061615999984402432, 464339910355487357558396669850788946402420533504952464572416
Offset: 0

Views

Author

Gus Wiseman, Dec 12 2018

Keywords

Examples

			Non-isomorphic representatives of the a(2) = 10 multiset systems:
  {}
  {{111}}
  {{122}}
  {{111}{222}}
  {{112}{122}}
  {{112}{222}}
  {{122}{222}}
  {{111}{122}{222}}
  {{112}{122}{222}}
  {{111}{112}{122}{222}}
		

Crossrefs

The 2-uniform case is A000666. The case of sets (as opposed to multisets) is A000665. The case of labeled spanning sets is A302374, with unlabeled case A322451.

Programs

  • Mathematica
    Table[Sum[2^PermutationCycles[Ordering[Map[Sort,Select[Tuples[Range[n],3],OrderedQ]/.Rule@@@Table[{i,prm[[i]]},{i,n}],{1}]],Length],{prm,Permutations[Range[n]]}]/n!,{n,6}]
  • PARI
    permcount(v)={my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
    rep(typ)={my(L=List(), k=0); for(i=1, #typ, k+=typ[i]; listput(L, k); while(#L0, u=vecsort(apply(f, u)); d=lex(u, v)); !d}
    Q(perm)={my(t=0); forsubset([#perm+2, 3], v, t += can([v[1],v[2]-1,v[3]-2], t->perm[t])); t}
    a(n)={my(s=0); forpart(p=n, s += permcount(p)*2^Q(rep(p))); s/n!} \\ Andrew Howroyd, Aug 26 2019

Extensions

Terms a(9) and beyond from Andrew Howroyd, Aug 26 2019

A370168 Number of unlabeled loop-graphs with n vertices and at most n edges.

Original entry on oeis.org

1, 2, 5, 13, 36, 102, 313, 994, 3318, 11536, 41748, 156735, 609973, 2456235, 10224216, 43946245, 194866898, 890575047, 4190997666, 20289434813, 100952490046, 515758568587, 2703023502100, 14518677321040, 79852871813827, 449333028779385, 2584677513933282
Offset: 0

Views

Author

Gus Wiseman, Feb 16 2024

Keywords

Examples

			The a(0) = 1 through a(3) = 13 loop-graph edge sets (loops shown as singletons):
  {}  {}     {}           {}
      {{1}}  {{1}}        {{1}}
             {{1,2}}      {{1,2}}
             {{1},{2}}    {{1},{2}}
             {{1},{1,2}}  {{1},{1,2}}
                          {{1},{2,3}}
                          {{1,2},{1,3}}
                          {{1},{2},{3}}
                          {{1},{2},{1,2}}
                          {{1},{2},{1,3}}
                          {{1},{1,2},{1,3}}
                          {{1},{1,2},{2,3}}
                          {{1,2},{1,3},{2,3}}
		

Crossrefs

The labeled version is A066383, covering A369194.
The case of equality is A368598, covering A368599.
The covering case is A370169, labeled A369194.
The loopless version is A370315, labeled A369192.
The covering loopless version is A370316, labeled A369191.
A006125 counts graphs, unlabeled A000088.
A006129 counts covering graphs, unlabeled A002494.
A322661 counts covering loop-graphs, unlabeled A322700.

Programs

  • Mathematica
    brute[m_]:=First[Sort[Table[Sort[Sort /@ (m/.Rule@@@Table[{(Union@@m)[[i]],p[[i]]},{i,Length[p]}])], {p,Permutations[Range[Length[Union@@m]]]}]]];
    Table[Length[Union[brute /@ Select[Subsets[Subsets[Range[n], {1,2}]],Length[#]<=n&]]],{n,0,5}]
  • PARI
    a(n)=my(A=O(x*x^n)); if(n==0, 1, polcoef(G(n, A)/(1-x), n)) \\ G defined in A070166. - Andrew Howroyd, Feb 19 2024

Extensions

a(7) onwards from Andrew Howroyd, Feb 19 2024

A283755 Irregular triangular array read by rows: T(n,k) = number of non-isomorphic unlabeled connected graphs with loops on n nodes and with k edges.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 3, 2, 1, 2, 6, 11, 13, 10, 5, 2, 1, 3, 14, 35, 61, 75, 68, 49, 28, 13, 5, 2, 1, 6, 33, 112, 262, 463, 625, 684, 620, 468, 301, 170, 82, 35, 14, 5, 2, 1, 11, 81, 347, 1059, 2458, 4565, 7018, 9122, 10186, 9878, 8366, 6219, 4085, 2377, 1232, 582, 251, 98, 37, 14, 5, 2, 1, 23, 204, 1085, 4091, 12014, 28779, 58162, 101315, 154484, 208321, 250120, 268649, 258994
Offset: 1

Views

Author

Marko Riedel, Mar 15 2017

Keywords

Comments

The range for the subindex k is from n-1 to n(n+1)/2.

Examples

			First rows are:
1,  1;
1,  1,  1;
1,  3,  3,  2,  1;
2,  6, 11, 13, 10,  5,  2,  1;
3, 14, 35, 61, 75, 68, 49, 28, 13, 5, 2, 1;
		

References

  • E. Palmer and F. Harary, Graphical Enumeration, Academic Press, 1973.

Crossrefs

Row sums are A054921.

Formula

T(n,k) = A322114(k,n). - Andrew Howroyd, Oct 23 2019

A319876 Irregular triangle read by rows where T(n,k) is the number of permutations of {1,...,n} whose action on 2-element subsets of {1,...,n} has k cycles.

Original entry on oeis.org

1, 0, 2, 0, 2, 3, 1, 0, 0, 14, 0, 9, 0, 1, 0, 0, 24, 50, 20, 0, 15, 10, 0, 0, 1, 0, 0, 0, 264, 0, 340, 0, 40, 0, 60, 0, 15, 0, 0, 0, 1, 0, 0, 0, 720, 1764, 504, 0, 1120, 630, 0, 0, 70, 105, 105, 0, 0, 21, 0, 0, 0, 0, 1, 0, 0, 0, 0, 13488, 0, 14112, 0, 3724, 0
Offset: 1

Views

Author

Gus Wiseman, Dec 12 2018

Keywords

Comments

The permutation
1 -> 1
2 -> 2
3 -> 4
4 -> 3
acts on unordered pairs of distinct elements of {1,2,3,4} to give
(1,2) -> (1,2)
(1,3) -> (1,4)
(1,4) -> (1,3)
(2,3) -> (2,4)
(2,4) -> (2,3)
(3,4) -> (3,4)
which has 4 cycles
(1,2)
(1,3) <-> (1,4)
(2,3) <-> (2,4)
(3,4)
so is counted under T(4,4).

Examples

			Triangle begins:
   1
   0   2
   0   2   3   1
   0   0  14   0   9   0   1
   0   0  24  50  20   0  15  10   0   0   1
   0   0   0 264   0 340   0  40   0  60   0  15   0   0   0   1
The T(4,4) = 9 permutations: (1243), (1324), (1432), (2134), (2143), (3214), (3412), (4231), (4321).
		

Crossrefs

Row n has A000124(n - 1) terms. Row sums are the factorial numbers A000142.

Programs

  • Mathematica
    Table[Length[Select[Permutations[Range[n]],PermutationCycles[Ordering[Map[Sort,Subsets[Range[n],{2}]/.Rule@@@Table[{i,#[[i]]},{i,n}],{1}]],Length]==k&]],{n,5},{k,0,n*(n-1)/2}]

Formula

A000088(n) = (1/n!) * Sum_k 2^k * T(n,k).

A228315 Triangular array read by rows: T(n,k) is the number of rooted labeled simple graphs on {1,2,...,n} such that the root is in a component of size k; n>=1, 1<=k<=n.

Original entry on oeis.org

1, 2, 2, 6, 6, 12, 32, 24, 48, 152, 320, 160, 240, 760, 3640, 6144, 1920, 1920, 4560, 21840, 160224, 229376, 43008, 26880, 42560, 152880, 1121568, 13063792, 16777216, 1835008, 688128, 680960, 1630720, 8972544, 104510336, 2012388736
Offset: 1

Views

Author

Geoffrey Critzer, Aug 26 2013

Keywords

Comments

Row sums = A095340.
Column 1 = A123903.
T(n,k) = A223894(n,k)*k.
Diagonal = A053549.

Examples

			1;
2,    2;
6,    6,    12;
32,   24,   48,    152;
320,  160,  240,   760,    3640;
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, 1973, page 7.

Crossrefs

Cf. A070166.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, 2^(n*(n-1)/2)-
          add(k*binomial(n, k)* 2^((n-k)*(n-k-1)/2)*b(k), k=1..n-1)/n)
        end:
    T:= (n, k)-> binomial(n, k)*k*b(k)*2^((n-k)*(n-k-1)/2):
    seq(seq(T(n, k), k=1..n), n=1..10);  # Alois P. Heinz, Aug 26 2013
  • Mathematica
    nn = 10; g = Sum[2^Binomial[n, 2] x^n/n!, {n, 0, nn}]; a =
    Drop[Range[0, nn]! CoefficientList[Series[Log[g], {x, 0, nn}], x],
      1]; Table[
      Table[Binomial[n, k] k a[[k]] 2^Binomial[n - k, 2], {k, 1, n}], {n,
       1, 7}] // Grid

Formula

T(n,k) = binomial(n,k)*k*A001187(k)*A006125(n-k).
Showing 1-9 of 9 results.