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-3 of 3 results.

A368597 Number of n-element sets of singletons or pairs of distinct elements of {1..n} with union {1..n}, or loop-graphs covering n vertices with n edges.

Original entry on oeis.org

1, 1, 3, 17, 150, 1803, 27364, 501015, 10736010, 263461265, 7283725704, 223967628066, 7581128184175, 280103206674480, 11216492736563655, 483875783716549277, 22371631078155742764, 1103548801569848115255, 57849356643299101021960, 3211439288584038922502820
Offset: 0

Views

Author

Gus Wiseman, Jan 04 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(3) = 17 set-systems:
  {}  {{1}}  {{1},{2}}    {{1},{2},{3}}
             {{1},{1,2}}  {{1},{2},{1,3}}
             {{2},{1,2}}  {{1},{2},{2,3}}
                          {{1},{3},{1,2}}
                          {{1},{3},{2,3}}
                          {{2},{3},{1,2}}
                          {{2},{3},{1,3}}
                          {{1},{1,2},{1,3}}
                          {{1},{1,2},{2,3}}
                          {{1},{1,3},{2,3}}
                          {{2},{1,2},{1,3}}
                          {{2},{1,2},{2,3}}
                          {{2},{1,3},{2,3}}
                          {{3},{1,2},{1,3}}
                          {{3},{1,2},{2,3}}
                          {{3},{1,3},{2,3}}
                          {{1,2},{1,3},{2,3}}
		

Crossrefs

This is the covering case of A014068.
Allowing edges of any positive size gives A054780, covering case of A136556.
Allowing any number of edges gives A322661, connected A062740.
The case of just pairs is A367863, covering case of A116508.
The unlabeled version is A368599.
The version contradicting strict AOC is A368730.
The connected case is A368951.
A000085 counts set partitions into singletons or pairs.
A006129 counts covering graphs, connected A001187.
A058891 counts set-systems, unlabeled A000612.
A100861 counts set partitions into singletons or pairs by number of pairs.
A111924 counts set partitions into singletons or pairs by length.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Subsets[Range[n],{1,2}], {n}],Union@@#==Range[n]&]],{n,0,5}]
  • PARI
    a(n) = sum(k=0, n, (-1)^(n-k) * binomial(n,k) * binomial(binomial(k+1,2), n)) \\ Andrew Howroyd, Jan 06 2024

Formula

a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * binomial(binomial(k+1,2), n). - Andrew Howroyd, Jan 06 2024

Extensions

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

A368924 Triangle read by rows where T(n,k) is the number of labeled loop-graphs on n vertices with k loops and n-k non-loops such that it is possible to choose a different vertex from each edge.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 1, 9, 6, 1, 15, 68, 48, 12, 1, 222, 720, 510, 150, 20, 1, 3670, 9738, 6825, 2180, 360, 30, 1, 68820, 159628, 110334, 36960, 6895, 735, 42, 1, 1456875, 3067320, 2090760, 721560, 145530, 17976, 1344, 56, 1, 34506640, 67512798, 45422928, 15989232, 3402756, 463680, 40908, 2268, 72, 1
Offset: 0

Views

Author

Gus Wiseman, Jan 10 2024

Keywords

Comments

The axiom of choice says that, given any set of nonempty sets Y, it is possible to choose a set containing an element from each. The strict version requires this set to have the same cardinality as Y, meaning no element is chosen more than once.

Examples

			Triangle begins:
      1
      0      1
      0      2      1
      1      9      6      1
     15     68     48     12      1
    222    720    510    150     20      1
   3670   9738   6825   2180    360     30      1
  68820 159628 110334  36960   6895    735     42      1
Row n = 3 counts the following loop-graphs:
  {{1,2},{1,3},{2,3}}  {{1},{1,2},{1,3}}  {{1},{2},{1,3}}  {{1},{2},{3}}
                       {{1},{1,2},{2,3}}  {{1},{2},{2,3}}
                       {{1},{1,3},{2,3}}  {{1},{3},{1,2}}
                       {{2},{1,2},{1,3}}  {{1},{3},{2,3}}
                       {{2},{1,2},{2,3}}  {{2},{3},{1,2}}
                       {{2},{1,3},{2,3}}  {{2},{3},{1,3}}
                       {{3},{1,2},{1,3}}
                       {{3},{1,2},{2,3}}
                       {{3},{1,3},{2,3}}
		

Crossrefs

Column k = n-1 is A002378.
The case of a unique choice is A061356, row sums A000272.
Column k = 0 is A137916, unlabeled version A137917.
Row sums appear to be A333331.
The complement has row sums A368596, covering case A368730.
The unlabeled version is A368926.
Without the choice condition we have A368928, A116508, A367863, A368597.
A000085, A100861, A111924 count set partitions into singletons or pairs.
A006125 counts graphs, unlabeled A000088.
A006129 counts covering graphs, unlabeled A002494.
A014068 counts loop-graphs, unlabeled A000666.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Subsets[Range[n],{1,2}],{n}], Count[#,{_}]==k&&Length[Select[Tuples[#], UnsameQ@@#&]]!=0&]],{n,0,5},{k,0,n}]
  • PARI
    T(n)={my(t=-lambertw(-x + O(x*x^n))); [Vecrev(p) | p <- Vec(serlaplace(exp(-log(1-t)/2 - t/2 + t*y - t^2/4)))]}
    { my(A=T(8)); for(i=1, #A, print(A[i])) } \\ Andrew Howroyd, Jan 14 2024

Formula

E.g.f.: A(x,y) = exp(-log(1-T(x))/2 - T(x)/2 + y*T(x) - T(x)^2/4) where T(x) = -LambertW(-x) is the e.g.f. of A000169. - Andrew Howroyd, Jan 14 2024

Extensions

a(36) onwards from Andrew Howroyd, Jan 14 2024

A368836 Triangle read by rows where T(n,k) is the number of unlabeled loop-graphs on up to n vertices with k loops and n-k non-loops.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 2, 2, 1, 2, 6, 6, 2, 1, 6, 17, 18, 8, 2, 1, 21, 52, 58, 30, 9, 2, 1, 65, 173, 191, 107, 37, 9, 2, 1, 221, 585, 666, 393, 148, 39, 9, 2, 1, 771, 2064, 2383, 1493, 589, 168, 40, 9, 2, 1, 2769, 7520, 8847, 5765, 2418, 718, 176, 40, 9, 2, 1
Offset: 0

Views

Author

Gus Wiseman, Jan 11 2024

Keywords

Comments

Are the row sums the same as column k = 1 (shifted left)?
Yes. When k = 1 there is one loop. Remove the vertex with the loop and add loops to its neighbors. This process is reversible so there is a bijection. - Andrew Howroyd, Jan 13 2024

Examples

			Triangle begins:
   1
   0  1
   0  1  1
   1  2  2  1
   2  6  6  2  1
   6 17 18  8  2  1
  21 52 58 30  9  2  1
Representatives of the loop-graphs counted by row n = 4:
  {12}{13}{14}{23} {1}{12}{13}{14} {1}{2}{12}{13} {1}{2}{3}{12} {1}{2}{3}{4}
  {12}{13}{24}{34} {1}{12}{13}{23} {1}{2}{12}{34} {1}{2}{3}{14}
                   {1}{12}{13}{24} {1}{2}{13}{14}
                   {1}{12}{23}{24} {1}{2}{13}{23}
                   {1}{12}{23}{34} {1}{2}{13}{24}
                   {1}{23}{24}{34} {1}{2}{13}{34}
		

Crossrefs

Column k = 0 is A001434.
Row sums are A368598.
The labeled version is A368928.
A000085, A100861, A111924 count set partitions into singletons or pairs.
A006125 counts graphs, unlabeled A000088.
A006129 counts covering graphs, unlabeled A002494.
A014068 counts loop-graphs, unlabeled A000666.
A058891 counts set-systems, unlabeled A000612.

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}],Count[#,{_}]==k&]]], {n,0,4},{k,0,n}]
  • 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)^g )) * prod(i=1, #v, my(c=v[i]); t(c)^((c-1)\2)*if(c%2, 1, t(c/2)))}
    row(n) = {my(s=0, A=1+O(x*x^n)); forpart(p=n, s+=permcount(p) * polcoef(edges(p, i->A + x^i)*prod(i=1, #p, A + (x*y)^p[i]), n)); Vecrev(s/n!)} \\ Andrew Howroyd, Jan 13 2024

Extensions

a(28) onwards from Andrew Howroyd, Jan 13 2024
Showing 1-3 of 3 results.