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-10 of 28 results. Next

A174137 Partial sums of A006905.

Original entry on oeis.org

1, 3, 16, 187, 4181, 158484, 9573673, 887796203, 123095499826, 25013843421773, 7332464142932061, 3060854010476035118, 1800064413234246359355, 1477862758280253372432667, 1680717420907850482529235664
Offset: 0

Views

Author

Jonathan Vos Post, Mar 09 2010

Keywords

Comments

Partial sums of number of transitive relations on n labeled nodes. After 3, none of the values shown is prime.

Crossrefs

Formula

a(n) = Sum_{i=0..n} A006905(i).

A348151 First differences of A006905.

Original entry on oeis.org

1, 11, 158, 3823, 150309, 9260886, 868807341, 121329481093, 24768540218324, 7282559551588341, 3046214096033592769, 1793950037677437221180, 1474265690307795355749075, 1677763495455703210030729685, 2626545934585707736394538773674, 5623547642339635201400382321016283
Offset: 1

Views

Author

Firdous Ahmad Mala, Oct 03 2021

Keywords

Comments

Number of transitive relations involving a particular element of an n-set.

Examples

			a(3) = A006905(3) - A006905(2) = 171 - 13 = 158.
		

Crossrefs

Cf. A006905.

Formula

a(n) = A006905(n) - A006905(n-1).

A000666 Number of symmetric relations on n nodes.

Original entry on oeis.org

1, 2, 6, 20, 90, 544, 5096, 79264, 2208612, 113743760, 10926227136, 1956363435360, 652335084592096, 405402273420996800, 470568642161119963904, 1023063423471189431054720, 4178849203082023236058229792, 32168008290073542372004082199424
Offset: 0

Views

Author

Keywords

Comments

Each node may or may not be related to itself.
Also the number of rooted graphs on n+1 nodes.
The 1-to-1 correspondence is as follows: Given a rooted graph on n+1 nodes, replace each edge joining the root node to another node with a self-loop at that node and erase the root node. The result is an undirected graph on n nodes which is the graph of the symmetric relation.
Also the number of the graphs with n nodes whereby each node is colored or not colored. A loop can be interpreted as a colored node. - Juergen Will, Oct 31 2011

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, pp. 101, 241.
  • M. D. McIlroy, Calculation of numbers of structures of relations on finite sets, Massachusetts Institute of Technology, Research Laboratory of Electronics, Quarterly Progress Reports, No. 17, Sept. 15, 1955, pp. 14-22.
  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1976.
  • 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

Cf. A000595, A001172, A001174, A006905, A000250, A054921 (connected relations).

Programs

  • Maple
    # see Riedel link above
  • Mathematica
    Join[{1,2}, Table[CycleIndex[Join[PairGroup[SymmetricGroup[n]], Permutations[Range[n*(n-1)/2+1, n*(n+1)/2]], 2],s] /. Table[s[i]->2, {i,1,n^2-n}], {n,2,8}]] (* Geoffrey Critzer, Nov 04 2011 *)
    Table[Module[{eds,pms,leq},
    eds=Select[Tuples[Range[n],2],OrderedQ];
    pms=Map[Sort,eds/.Table[i->Part[#,i],{i,n}]]&/@Permutations[Range[n]];
    leq=Function[seq,PermutationCycles[Ordering[seq],Length]]/@pms;
    Total[Thread[Power[2,leq]]]/n!
    ],{n,0,8}] (* This is after Geoffrey Critzer's program but does not use the (deprecated) Combinatorica package. - Gus Wiseman, Jul 21 2016 *)
    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[GCD[v[[i]], v[[j]]], {j, 1, i-1}], {i, 2, Length[v]}] + Sum[Quotient[v[[i]], 2] + 1, {i, 1, Length[v]}];
    a[n_] := a[n] = (s = 0; Do[s += permcount[p]*2^edges[p], {p, IntegerPartitions[n]}]; s/n!);
    Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 0, 17}] (* Jean-François Alcover, Nov 13 2017, 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, gcd(v[i],v[j]))) + sum(i=1, #v, v[i]\2 + 1)}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*2^edges(p)); s/n!} \\ Andrew Howroyd, Oct 22 2017
    
  • Python
    from itertools import combinations
    from math import prod, factorial, gcd
    from fractions import Fraction
    from sympy.utilities.iterables import partitions
    def A000666(n): return int(sum(Fraction(1<>1)+1)*r+(q*r*(r-1)>>1) 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 02 2024

Formula

Euler transform of A054921. - N. J. A. Sloane, Oct 25 2018
Let G_{n+1,k} be the number of rooted graphs on n+1 nodes with k edges and let G_{n+1}(x) = Sum_{k=0..n(n+1)/2} G_{n+1,k} x^k. Thus a(n) = G_{n+1}(1). Let S_n(x_1, ..., x_n) denote the cycle index for Sym_n. (cf. the link in A000142).
Compute x_1*S_n and regard it as the cycle index of a set of permutations on n+1 points and find the corresponding cycle index for the action on the n(n+1)/2 edges joining those points (the corresponding "pair group"). Finally, by replacing each x_i by 1+x^i gives G_{n+1}(x). [Harary]
Example, n=2. S_2 = (1/2)*(x_1^2+x_2), x_1*S_2 = (1/2)*(x_1^3+x_1*x_2). The pair group is (1/2)*(x_1^2+x_1*x_2) and so G_3(x) = (1/2)*((1+x)^3+(1+x)*(1+x^2)) = 1+2*x+2*x^2+x^3; set x=1 to get a(2) = 6.
a(n) ~ 2^(n*(n+1)/2)/n! [McIlroy, 1955]. - Vaclav Kotesovec, Dec 19 2016

Extensions

Description corrected by Christian G. Bower
More terms from Vladeta Jovovic, Apr 18 2000
Entry revised by N. J. A. Sloane, Mar 06 2007

A088316 a(n) = 13*a(n-1) + a(n-2), starting with a(0) = 2 and a(1) = 13.

Original entry on oeis.org

2, 13, 171, 2236, 29239, 382343, 4999698, 65378417, 854919119, 11179326964, 146186169651, 1911599532427, 24996980091202, 326872340718053, 4274337409425891, 55893258663254636, 730886700031736159, 9557420359075824703, 124977351368017457298, 1634262988143302769577
Offset: 0

Views

Author

Nikolay V. Kosinov, Dmitry V. Polyakov (kosinov(AT)unitron.com.ua), Nov 06 2003

Keywords

Comments

For more information about this type of recurrence follow the Khovanova link and see A086902 and A054413. - Johannes W. Meijer, Jun 12 2010

Crossrefs

Programs

  • Magma
    I:=[2,13]; [n le 2 select I[n] else 13*Self(n-1) +Self(n-2): n in [1..31]]; // G. C. Greubel, Dec 13 2022
    
  • Mathematica
    LinearRecurrence[{13,1}, {2,13}, 31] (* Stefano Spezia, Sep 20 2022 *)
  • SageMath
    A088316=BinaryRecurrenceSequence(13,1,2,13)
    [A088316(n) for n in range(31)] # G. C. Greubel, Dec 13 2022

Formula

a(n) = ((13+sqrt(173))/2)^n + ((13-sqrt(173))/2)^n.
Lim_{n -> oo} a(n+1)/a(n) = (13 + sqrt(173))/2.
Lim_{n -> oo} a(n)/a(n+1) = 2/(13+sqrt(173)).
G.f.: (2-13*x)/(1-13*x-x^2). - Philippe Deléham, Nov 02 2008
From Johannes W. Meijer, Jun 12 2010: (Start)
a(2*n+1) = 13*A097845(n).
a(3*n+1) = A041318(5n), a(3n+2) = A041318(5n+3), a(3n+3) = 2*A041318(5n+4).
Limit_{k->oo} a(n+k)/a(k) = (A088316(n) + A140455(n)*sqrt(173))/2.
Limit_{n->oo} A088316(n)/A140455(n) = sqrt(173). (End)

A121337 Number of idempotent relations on n labeled elements.

Original entry on oeis.org

1, 2, 11, 123, 2360, 73023, 3465357
Offset: 0

Views

Author

Florian Kammüller (flokam(AT)cs.tu-berlin.de), Aug 28 2006

Keywords

Comments

A relation r is idempotent if r ; r = r, where ; denotes sequential composition.
From Geoffrey Critzer, Oct 18 2023 : (Start)
a(n) is also the number of maximal subgroups in the semigroup of binary relations on [n]. See Butler and Markowski link.
A binary relation is idempotent iff it is both dense (A355730) and transitive (A006905).
A binary relation is idempotent iff it is both limit dominating (A366194) and limit dominated (A366722). See Gregory, Kirkland, and Pullman link.
A binary relation R on [n] is idempotent iff the following biconditional statement holds for all x,y in [n]: There is a cyclic traverse from x to y in G(R) iff (x,y) is in R. Here, G(R) is the directed graph with self loops allowed (A002416) corresponding to R. See Rosenblatt link.
Let Q be a quasi-order (A000798) on [n]. Let D(X) be the relation {(x,x):x is in X}. Let S be a subset of [n] such that: (i) For all x in S, the class in the equivalence relation Q intersect Q^(-1) containing (x,x) is a singleton and (ii) for all x,y in S, the component containing x is not covered by the component containing y in the condensation of G(Q) . Here, the condensation of G(Q) is the acyclic digraph (A003024) obtained from G(Q) by replacing every strongly connected component (SCC) by a single vertex and all directed edges from one SCC to another with a single directed edge. Then a relation is idempotent iff it is of the form Q-D(S). See Schein link. (End)

Examples

			a(2) = 11 because given a set {a,b} of two elements, of the 2^(2*2) = 16 relations on the set, only 5 are not idempotent. - _Michael Somos_, Jul 28 2013
These 5 relations that are not idempotent are: {(a,b)}, {(b,a)}, {(a,b),(b,a)}, {(a,b),(b,a),(b,b)}, {(a,a),(a,b),(b,a)}. - _Geoffrey Critzer_, Aug 07 2016
		

References

  • F. Kammüller, Interactive Theorem Proving in Software Engineering, Habilitationsschrift, Technische Universitaet Berlin (2006).
  • Ki Hang Kim, Boolean Matrix Theory and Applications, Marcel Decker, 1982.

Crossrefs

Cf. A000798 (labeled quasi-orders (or topologies)), A001930 (unlabeled quasi-orders), A001035 (labeled partial orders), A000112 (unlabeled partial orders), A002416, A003024, A366722, A366194, A355730, A006905.
Row sums of A360984.

Programs

  • Mathematica
    Prepend[Table[Length[Select[Tuples[Tuples[{0, 1}, n], n], (MatrixPower[#, 2] /. x_ /; x > 0 -> 1) == # &]], {n, 1, 4}], 1] (* Geoffrey Critzer, Aug 07 2016 *)

Extensions

Offset corrected by James Mitchell, Jul 28 2013
a(1) corrected by Philippe Beaudoin, Aug 11 2015

A169720 a(n) = (3*2^(n-1)-1)*(3*2^n-1).

Original entry on oeis.org

1, 10, 55, 253, 1081, 4465, 18145, 73153, 293761, 1177345, 4713985, 18865153, 75479041, 301953025, 1207885825, 4831690753, 19327057921, 77308821505, 309236465665, 1236948221953, 4947797606401, 19791199862785, 79164818325505, 316659311050753, 1266637319700481
Offset: 0

Views

Author

Alice V. Kleeva (alice27353(AT)gmail.com), Jan 19 2010

Keywords

Comments

A subsequence of the triangular numbers A000217.

Crossrefs

Programs

  • Magma
    I:=[1, 10, 55]; [n le 3 select I[n] else 7*Self(n-1)-14*Self(n-2)+8*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Dec 03 2012
  • Mathematica
    CoefficientList[Series[(1 + 3*x - x^2)/((1-x)*(1-2*x)*(1-4*x)), {x, 0, 30}], x] (* or *) LinearRecurrence[{7, -14, 8}, {1, 10, 55}, 30] (* Vincenzo Librandi, Dec 03 2012 *)
  • PARI
    a(n)=polcoeff((1+3*x-x^2)/((1-x)*(1-2*x)*(1-4*x)+x*O(x^n)),n) \\ Paul D. Hanna, Apr 29 2010
    

Formula

G.f.: (1 + 3*x - x^2)/((1-x)*(1-2*x)*(1-4*x)). - Paul D. Hanna, Apr 29 2010
a(n) = A000217(A033484(n)). - Mitch Harris, Dec 02 2012
a(n) = 7*a(n-1) - 14*a(n-2) + 8*a(n-3). - Vincenzo Librandi, Dec 03 2012
a(n) = (3*A169726(n)-1)/2. - L. Edson Jeffery, Dec 03 2012
a(n) = A006095(n+2) +3*A006095(n+1) - A006905(n). - R. J. Mathar, Dec 04 2016

A340264 T(n, k) = Sum_{j=0..k} binomial(n, k - j)*Stirling2(n - k + j, j). Triangle read by rows, 0 <= k <= n.

Original entry on oeis.org

1, 0, 2, 0, 1, 4, 0, 1, 6, 8, 0, 1, 11, 24, 16, 0, 1, 20, 70, 80, 32, 0, 1, 37, 195, 340, 240, 64, 0, 1, 70, 539, 1330, 1400, 672, 128, 0, 1, 135, 1498, 5033, 7280, 5152, 1792, 256, 0, 1, 264, 4204, 18816, 35826, 34272, 17472, 4608, 512
Offset: 0

Views

Author

Peter Luschny, Jan 08 2021

Keywords

Comments

A006905(n) = Sum_{k=0..n} A001035(k) * T(n, k). - Michael Somos, Jul 18 2021
T(n, k) is the number of idempotent relations R on [n] containing exactly k strongly connected components such that the following conditional statement holds for all x, y in [n]: If x, y are in distinct strongly connected components of R then (x, y) is not in R. - Geoffrey Critzer, Jan 10 2024

Examples

			[0] 1;
[1] 0, 2;
[2] 0, 1,   4;
[3] 0, 1,   6,    8;
[4] 0, 1,  11,   24,    16;
[5] 0, 1,  20,   70,    80,    32;
[6] 0, 1,  37,  195,   340,   240,    64;
[7] 0, 1,  70,  539,  1330,  1400,   672,   128;
[8] 0, 1, 135, 1498,  5033,  7280,  5152,  1792,  256;
[9] 0, 1, 264, 4204, 18816, 35826, 34272, 17472, 4608, 512;
		

Crossrefs

Sum of row(n) is A000110(n+1).
Sum of row(n) - 2^n is A058681(n).
Alternating sum of row(n) is A109747(n).

Programs

  • Maple
    egf := exp(t*(exp(-x) - x - 1));
    ser := series(egf, x, 22):
    p := n -> coeff(ser, x, n);
    seq(seq((-1)^n*n!*coeff(p(n), t, k), k=0..n), n = 0..10);
    # Alternative:
    T := (n, k) -> add(binomial(n, k - j)*Stirling2(n - k + j, j), j=0..k):
    seq(seq(T(n, k), k = 0..n), n=0..9); # Peter Luschny, Feb 09 2021
  • Mathematica
    T[ n_, k_] := Sum[ Binomial[n, k-j] StirlingS2[n-k+j, j], {j, 0 ,k}]; (* Michael Somos, Jul 18 2021 *)
  • PARI
    T(n, k) = sum(j=0, k, binomial(n, j)*stirling(n-j, k-j, 2)); /* Michael Somos, Jul 18 2021 */

Formula

T(n, k) = (-1)^n * n! * [t^k] [x^n] exp(t*(exp(-x) - x - 1)).
n-th row polynomial R(n,x) = exp(-x)*Sum_{k >= 0} (x + k)^n * x^k/k! = Sum_{k = 0..n} binomial(n,k)*Bell(k,x)*x^(n-k), where Bell(n,x) denotes the n-th Bell polynomial. - Peter Bala, Jan 13 2022

Extensions

New name from Peter Luschny, Feb 09 2021

A085628 Number of antisymmetric transitive binary relations on n labeled points.

Original entry on oeis.org

1, 2, 12, 152, 3504, 135392, 8321472, 784621952, 110521185024, 22789653765632, 6769730814753792, 2859584874712881152, 1699286839524775931904, 1407801166901961190203392, 1613567168628788544015286272, 2541721059997800475952740401152, 5470980000021882982488097199161344
Offset: 0

Views

Author

Goetz Pfeiffer (goetz.pfeiffer(AT)nuigalway.ie), Jan 21 2004

Keywords

Crossrefs

Cf. A079265 (unlabeled antisymmetric transitive relations), A001035 (labeled partial orders), A000798 (labeled reflexive transitive relations), A006905 (labeled transitive relations).

Programs

Formula

a(n) = 2^n * A001035(n) = A000079(n) * A001035(n)
E.g.f.: A(2*x) where A(x) is the e.g.f. for A001035. - Geoffrey Critzer, Jul 28 2014

Extensions

2 more terms from Charles R Greathouse IV, Aug 31 2006

A091073 Number of transitive relations on n unlabeled points.

Original entry on oeis.org

1, 2, 8, 39, 242, 1895, 19051, 246895, 4145108, 90325655, 2555630036, 93810648902, 4461086120602, 274339212258846, 21775814889230580, 2226876304576948549
Offset: 0

Views

Author

Goetz Pfeiffer (goetz.pfeiffer(AT)nuigalway.ie), Jan 21 2004

Keywords

Comments

a(13)-a(15) are from Brinkmann's and McKay's paper. - Vladeta Jovovic, Jan 07 2006

Crossrefs

Cf. A079265 (antisymmetric transitive relations), A001930 (reflexive transitive relations), A000112 (partial orders), A006905 (labeled transitive relations).

Extensions

More terms from Vladeta Jovovic, Jan 07 2006

A355730 Number of binary relations R on [n] such that R is contained in R^2.

Original entry on oeis.org

1, 2, 13, 333, 34924, 15339497, 28399641433
Offset: 0

Views

Author

Geoffrey Critzer, Jul 15 2022

Keywords

Comments

Equivalently, a(n) is the number of binary relations R on [n] such that for all x,y in [n], if (x,y) is in R then there is a z in [n] such that (x,z) and (z,y) are both in R. A relation having this property is sometimes called a dense relation.
Almost all relations are dense.
A relation is idempotent if and only if it is both transitive and dense. A transitive relation R is dense (hence idempotent) if and only if there does not exist a pair (C_1,C_2) of edgeless components such that C_1 covers C_2 in the condensation of G(R). Here, G(R) is the directed graph (with self loops allowed) associated to R. The condensation of G(R) is the acyclic digraph obtained from G(R) by replacing every strongly connected component (SCC) by a single vertex and all directed edges from one SCC to another with a single directed edge. See Schein reference.
If R is contained in R^2 then the maximal cyclic nets in R are primitive (A070322) so that R is convergent, i.e., the period of R is equal to 1. Moreover, R converges to its transitive closure so that the index of R is at most n. See Rosenblatt reference. - Geoffrey Critzer, Sep 05 2023

Examples

			a(2) = 13 because all 16 binary relations on [2] are dense except for {{0,1},{0,0}}, {{0,0},{1,0}}, {{0,1},{1,0}}.
		

Crossrefs

Programs

  • Mathematica
    Table[B = Tuples[Tuples[{0, 1}, nn], nn]; subsetQ[matrix1_, matrix2_] :=
      Apply[And, Map[! MemberQ[#, 1] &, matrix1 - matrix2]];Select[B, subsetQ[#, Clip[#.#]] &] // Length, {nn, 0, 4}]

Formula

Limit_{n->oo} a(n)/2^(n^2) = 1.

Extensions

a(5)-a(6) from Pontus von Brömssen, Jul 19 2022
Comments clarified by Geoffrey Critzer, Oct 16 2023
Showing 1-10 of 28 results. Next