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

A001374 Number of relational systems on n nodes. Also number of directed 3-multigraphs with loops on n nodes.

Original entry on oeis.org

4, 136, 44224, 179228736, 9383939974144, 6558936236286040064, 62879572771326489528942592, 8439543710699844562674685252214784, 16110027001555070629022725866559372785352704, 442829046878106126159584032189649757399796014050181120
Offset: 1

Views

Author

Keywords

References

  • W. Oberschelp, "Strukturzahlen in endlichen Relationssystemen", in Contributions to Mathematical Logic (Proceedings 1966 Hanover Colloquium), pp. 199-213, North-Holland Publ., Amsterdam, 1968.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    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_] := Sum[2*GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[v];
    a[n_] := (s=0; Do[s += permcount[p]*4^edges[p], {p, IntegerPartitions[n]}]; s/n!);
    Array[a, 15] (* Jean-François Alcover, Jul 08 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) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i],v[j]))) + sum(i=1, #v, v[i])}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*4^edges(p)); s/n!} \\ Andrew Howroyd, Oct 22 2017
    
  • Python
    from itertools import combinations
    from math import prod, gcd, factorial
    from fractions import Fraction
    from sympy.utilities.iterables import partitions
    def A001374(n): return int(sum(Fraction(1<<((sum(p[r]*p[s]*gcd(r,s) for r,s in combinations(p.keys(),2))<<1)+sum(q*r**2 for q, r in p.items())<<1),prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n))) # Chai Wah Wu, Jul 10 2024

Extensions

More terms from Vladeta Jovovic, Jan 14 2000

A053516 Number of directed 4-multigraphs with loops on n nodes.

Original entry on oeis.org

5, 325, 327125, 6360324375, 2483590604688125, 20211024423069510171875, 3524517841661451239027963515625, 13444967478414031326768049544880110156250, 1139744010069698074379093986222808985702884783203125
Offset: 1

Views

Author

Vladeta Jovovic, Jan 14 2000

Keywords

Crossrefs

Programs

  • Mathematica
    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_] := Sum[2*GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[v];
    a[n_] := (s=0; Do[s += permcount[p]*5^edges[p], {p, IntegerPartitions[n]}]; s/n!);
    Array[a, 15] (* Jean-François Alcover, Jul 08 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) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i],v[j]))) + sum(i=1, #v, v[i])}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*5^edges(p)); s/n!} \\ Andrew Howroyd, Oct 22 2017

Extensions

a(9) from Andrew Howroyd, Oct 22 2017

A004106 Number of line-self-dual nets (or edge-self-dual nets) with n nodes.

Original entry on oeis.org

1, 2, 3, 8, 29, 148, 1043, 11984, 229027, 6997682, 366204347, 30394774084, 4363985982959, 994090870519508, 393850452332173999, 249278602955869472540, 275042591834324901085904, 488860279973733024992540668, 1514493725905920009795681408275
Offset: 0

Views

Author

Keywords

Comments

A net in this context is a graph with both signed vertices and signed edges. A net is line-self-dual if changing the signs on all edges leaves the graph unchanged up to isomorphism. - Andrew Howroyd, Sep 25 2018

References

  • F. Harary and R. W. Robinson, Exposition of the enumeration of point-line-signed graphs, pp. 19 - 33 of Proc. Second Caribbean Conference Combinatorics and Computing (Bridgetown, 1977). Ed. R. C. Read and C. C. Cadogan. University of the West Indies, Cave Hill Campus, Barbados, 1977. vii+223 pp.
  • R. W. Robinson, personal communication.
  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1976.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    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_] := Sum[Sum[If[Mod[v[[i]] v[[j]], 2] == 0, GCD[v[[i]], v[[j]]], 0], {j, 1, i - 1}], {i, 2, Length[v]}] + Sum[If[Mod[v[[i]], 2] == 0, 2 Quotient[v[[i]], 4], 0], {i, 1, Length[v]}];
    a[n_] := Module[{s = 0}, Do[s += permcount[p]*3^edges[p]*2^Length[p], {p, IntegerPartitions[n]}]; s/n!];
    Array[a, 19, 0] (* Jean-François Alcover, Aug 17 2019, 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) = {sum(i=2, #v, sum(j=1, i-1, if(v[i]*v[j]%2==0, gcd(v[i], v[j])))) + sum(i=1, #v, if(v[i]%2==0, v[i]\4*2))}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*3^edges(p)*2^#p); s/n!} \\ Andrew Howroyd, Sep 25 2018
    
  • Python
    from itertools import combinations
    from math import prod, gcd, factorial
    from fractions import Fraction
    from sympy.utilities.iterables import partitions
    def A004106(n): return int(sum(Fraction(3**(sum(p[r]*p[s]*gcd(r,s) for r,s in combinations(p.keys(),2) if not (r&1 and s&1))+sum(((q>>1)&-2)*r+(q*r*(r-1)>>1) for q, r in p.items() if q&1^1))<Chai Wah Wu, Jul 10 2024

Extensions

a(0)=1 prepended and a(17)-a(18) added by Andrew Howroyd, Sep 25 2018

A004107 Number of self-dual nets with 2n nodes.

Original entry on oeis.org

1, 1, 9, 165, 24651, 29522961, 286646256675, 21717897090413481, 12980536689318626076840, 62082697145168772833294318409, 2405195296608025717214293025492960466, 762399078635131851885116768114137369439908725
Offset: 0

Views

Author

Keywords

Comments

A net in this context is a graph with both signed vertices and signed edges. A net is self-dual if changing the signs on all edges and vertices leaves the graph unchanged up to isomorphism. - Andrew Howroyd, Sep 25 2018

References

  • F. Harary and R. W. Robinson, Exposition of the enumeration of point-line-signed graphs, pp. 19 - 33 of Proc. Second Caribbean Conference Combinatorics and Computing (Bridgetown, 1977). Ed. R. C. Read and C. C. Cadogan. University of the West Indies, Cave Hill Campus, Barbados, 1977. vii+223 pp.
  • R. W. Robinson, personal communication.
  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1976.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    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_] := 2 Sum[Sum[GCD[v[[i]], v[[j]]], {j, 1, i - 1}], {i, 2, Length[v]}] + Sum[2 Quotient[v[[i]], 2], {i, 1, Length[v]}];
    a[n_] := Module[{s = 0}, Do[s += permcount[p]*3^edges[p], {p, IntegerPartitions[n]}]; s/n!];
    Array[a, 12, 0] (* Jean-François Alcover, Aug 17 2019, 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) = {2*sum(i=2, #v, sum(j=1, i-1, gcd(v[i], v[j]))) + sum(i=1, #v, v[i]\2*2)}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*3^edges(p)); s/n!} \\ Andrew Howroyd, Sep 25 2018
    
  • Python
    from itertools import combinations
    from math import prod, gcd, factorial
    from fractions import Fraction
    from sympy.utilities.iterables import partitions
    def A004107(n): return int(sum(Fraction(3**((sum(p[r]*p[s]*gcd(r,s) for r,s in combinations(p.keys(),2))<<1)+sum(((q&-2)+q*(r-1))*r for q, r in p.items())),prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n))) # Chai Wah Wu, Jul 09 2024

Extensions

a(0)=1 prepended by Andrew Howroyd, Sep 25 2018

A052113 Number of self-complementary directed 2-multigraphs with loops on n nodes.

Original entry on oeis.org

1, 5, 41, 1023, 67173, 10771355, 5957216417, 6971880064072, 32181855124938673, 290910256437910060602, 11266525980714327353251353, 815201852317091835592374861144, 266236010885685869904935495261864265, 157899403462038839125137738939159318226008
Offset: 1

Views

Author

Vladeta Jovovic, Jan 21 2000

Keywords

Comments

A 2-multigraph is similar to an ordinary graph except there are 0, 1 or 2 edges between any two nodes (self-loops are not allowed).

References

  • V. Jovovic, On the number of m-place relations (in Russian), Logiko-algebraicheskie konstruktsii, Tver, 1992, 59-66.

Crossrefs

Programs

  • 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) = {2*sum(i=2, #v, sum(j=1, i-1, if(v[i]*v[j]%2==0, gcd(v[i],v[j])))) + sum(i=1, #v, if(v[i]%2==0, v[i]))}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*3^edges(p)); s/n!} \\ Andrew Howroyd, Sep 16 2018

Extensions

Terms a(14) and beyond from Andrew Howroyd, Sep 16 2018

A154238 Number of orbits of the action g*b = b o (g x g) of the group of permutations g of an n-element set S on the set of closed binary operations b on S.

Original entry on oeis.org

1, 1, 10, 3411, 179228736, 2483590604688125, 14325593551925794051596768, 50976900379139614139041610902600299311, 155682086692129060007763454017522652304844346252853248
Offset: 0

Views

Author

David Pasino, Jan 05 2009, Jan 08 2009, Jan 12 2009

Keywords

Comments

Here are several different ways of expressing the condition that g*b = b:
b(u, v) = b(gu, gv) for all u, v in S.
The level sets of b are closed under g x g.
The level sets of b are unions of cycles of g x g.
The cycles of g x g are subsets of level sets of b.
b is constant on cycles of g x g.
There is no requirement for g to be an automorphism of b. Given g, the fixed b are determined by simply choosing a value in S for each cycle of g x g. The product b(u, v) is defined to be that constant value for every (u, v) in the cycle.
So the number of degrees of freedom for b is the number of cycles of g x g. How many cycles does g have on S x S? If u is in a c-cycle C and v is in a d-cycle D, then (u, v) is in an lcm(c, d)-cycle and C x D is partitioned into these cycles, so there must be cd/lcm(c, d) of them, which is gcd(c, d).
So letting s_k be the number of k-cycles of g on S for each k from 1 to n, the total number of cycles of g on S x S is the sum on k and j of gcd(k, j) s_k s_j. That's the number of degrees of freedom for b and each degree has valence n, so raise n to that power. Then multiply by the well-known number of permutations of type s, which is n! divided by the factorials of the s_k and by the powers k^s_k. Add this up over all the partitions of n and divide by n!.
Additional comments from Christian G. Bower: This is the number of nonisomorphic n-state relations on a set of n elements. If at the step of raising n to the power, we raised instead some constant m to that power, the formula would give the number of isomorphism classes of m-state relations on an n-element set.

Crossrefs

Cf. k-state relations: A000595 for k=2, A004105 for k=3, A001374 for k=4, A053516 for k=5.

Formula

a(n) = Sum_{1*s_1 + 2*s_2 + ... = n} (fixA[s_1, s_2,..]/(1^s_1*s_1!*2^s_2*s2!* ...)) where fixA[s_1, s_2, ...] = n^(Sum_{i, j>=1} gcd(i, j)*s_i*s_j).

Extensions

Edited by Christian G. Bower and N. J. A. Sloane, Jan 08 2009

A320994 Number of connected point-self-dual nets with 2n nodes.

Original entry on oeis.org

1, 2, 37, 3264, 1798306, 7066174625, 208496688495494, 47481277563116098111, 85161165189313899034899294, 1221965295353715648352925546245057, 142024241427456183309163988600775633635361, 135056692113925953789612785828652550808044930178235
Offset: 0

Views

Author

N. J. A. Sloane, Oct 26 2018

Keywords

Crossrefs

Cf. A004103 (nets), A004105 (point-self-dual on 2n nodes), A320489 (connected nets).

Programs

Formula

a(2*n-1) = b(2*n-1) - A320489(2*n-1)/2, a(2*n) = b(2*n) - (A320489(2*n)-a(n))/2 where b is the Inverse Euler transform of A004105. - Andrew Howroyd, Jan 27 2020

Extensions

a(0)=1 prepended and terms a(7) and beyond from Andrew Howroyd, Jan 26 2020
Showing 1-7 of 7 results.