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 25 results. Next

A005195 Number of forests with n unlabeled nodes.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 37, 76, 153, 329, 710, 1601, 3658, 8599, 20514, 49905, 122963, 307199, 775529, 1977878, 5086638, 13184156, 34402932, 90328674, 238474986, 632775648, 1686705630, 4514955632, 12132227370, 32717113805, 88519867048, 240235675303
Offset: 0

Views

Author

Keywords

Comments

Same as "Number of forests with n nodes that are perfect graphs" [see Hougardy]. - N. J. A. Sloane, Dec 04 2015
Number of unlabeled acyclic graphs on n vertices. The labeled version is A001858. The covering case is A144958, connected A000055. - Gus Wiseman, Apr 29 2024

Examples

			From _Gus Wiseman_, Apr 29 2024: (Start)
Edge-sets of non-isomorphic representatives of the a(0) = 1 through a(5) = 10 forests:
  {}  {}  {}    {}       {}          {}
          {12}  {12}     {12}        {12}
                {13,23}  {12,34}     {12,34}
                         {13,23}     {13,23}
                         {13,24,34}  {12,35,45}
                         {14,24,34}  {13,24,34}
                                     {14,24,34}
                                     {13,24,35,45}
                                     {14,25,35,45}
                                     {15,25,35,45}
(End)
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, pp. 58-59.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A095133 (by number of trees), A136605 (by number of edges).
A diagonal of A144215.
The connected case is A000055.
The labeled version is A001858.
The covering case is A144958, labeled A105784.
For triangles instead of cycles we have A006785, covering A372169.
Unique cycle: A236570 (labeled A372193), covering A372191 (labeled A372195).
A006125 counts simple graphs, unlabeled A000088.
A006129 counts covering graphs, unlabeled A002494.

Programs

  • Mathematica
    EulerTransform[ seq_List ] := With[{m = Length[seq]}, CoefficientList[ Series[ Times @@ (1/(1 - x^Range[m])^seq), {x, 0, m}], x]];
    b[n_] := b[n] = If[n <= 1, n, Sum[ Sum[ d*b[d], {d, Divisors[j]}]*b[n - j], {j, 1, n - 1}]/(n - 1)];
    a55[n_] := a55[n] = If[n == 0, 1, b[n] - (Sum[ b[k]*b[n - k], {k, 0, n}] - If[Mod[n, 2] == 0, b[n/2], 0])/2]; A000055 = Table[ a55[n], {n, 1, 31}]; EulerTransform[ A000055 ] (* Jean-François Alcover, Mar 15 2012 *)

Formula

Euler transform of A000055: Product_{n>0} (1-x^n)^(-A000055(n)). a(n) = 1/n*Sum_{k=1..n} b(k)*a(n-k), where b(k) = Sum_{d divides k} d*A000055(d). - Vladeta Jovovic, Sep 05 2002
G.f.: exp(sum_{k>0} B(x^k)/k ), where B(x) = x + x^2 + x^3 + 2*x^4 + 3*x^5 + 6*x^6 + 11*x^7 + ... = C(x)-1 and C is the g.f. for A000055.
a(n) ~ c * d^n / n^(5/2), where d = A051491 = 2.9557652856519949747148..., c = 1.023158422... . - Vaclav Kotesovec, Nov 16 2014
First differences are A144958. - Gus Wiseman, Apr 29 2024

Extensions

More terms from Vladeta Jovovic, Sep 05 2002

A144958 Number of unlabeled acyclic graphs covering n vertices.

Original entry on oeis.org

1, 0, 1, 1, 3, 4, 10, 17, 39, 77, 176, 381, 891, 2057, 4941, 11915, 29391, 73058, 184236, 468330, 1202349, 3108760, 8097518, 21218776, 55925742, 148146312, 394300662, 1053929982, 2828250002, 7617271738, 20584886435, 55802753243
Offset: 0

Views

Author

Washington Bomfim, Sep 27 2008

Keywords

Comments

a(n) is the number of forests with n unlabeled nodes without isolated vertices. This follows from the fact that for n>0 A005195(n-1) counts the forests with one or more isolated nodes.
The labeled version is A105784. The connected case is A000055. This is the covering case of A005195. - Gus Wiseman, Apr 29 2024

Examples

			From _Gus Wiseman_, Apr 29 2024: (Start)
Edge-sets of non-isomorphic representatives of the a(0) = 1 through a(5) = 4 forests:
  {}    .    {12}    {13,23}    {12,34}       {12,35,45}
                                {13,24,34}    {13,24,35,45}
                                {14,24,34}    {14,25,35,45}
                                              {15,25,35,45}
(End)
		

Crossrefs

The connected case is A000055.
This is the covering case of A005195, labeled A001858.
The labeled version is A105784.
For triangles instead of cycles we have A372169, non-covering A006785.
Unique cycle: A372191 (lab A372195), non-covering A236570 (lab A372193).
A006125 counts simple graphs, unlabeled A000088.
A006129 counts covering graphs, unlabeled A002494.

Programs

  • Mathematica
    brute[m_]:=First[Sort[Table[Sort[Sort/@(m/.Rule@@@Table[{i,p[[i]]},{i,Length[p]}])],{p,Permutations[Union@@m]}]]];
    cyc[y_]:=Select[Join@@Table[Select[Join@@Permutations/@Subsets[Union@@y,{k}],And@@Table[MemberQ[Sort/@y,Sort[{#[[i]],#[[If[i==k,1,i+1]]]}]],{i,k}]&],{k,3,Length[y]}],Min@@#==First[#]&];
    Table[Length[Union[Union[brute/@Select[Subsets[Subsets[Range[n],{2}]],Union@@#==Range[n]&&Length[cyc[#]]==0&]]]],{n,0,5}] (* Gus Wiseman, Apr 29 2024 *)
  • PARI
    EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
    TreeGf(N)={my(A=vector(N, j, 1)); for (n=1, N-1, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, d*A[d]) * A[n-k+1] ) ); x*Ser(A)}
    seq(n)={my(t=TreeGf(n), v=EulerT(Vec(t - t^2/2 + subst(t,x,x^2)/2))); concat([1,0], vector(#v-1, i, v[i+1]-v[i]))} \\ Andrew Howroyd, Aug 01 2024

Formula

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

Extensions

Name changed and 1 prepended by Gus Wiseman, Apr 29 2024.

A213434 a(n) is the number of labeled triangle-free simple graphs on n vertices.

Original entry on oeis.org

1, 2, 7, 41, 388, 5789, 133501, 4682270, 246348115, 19213627145, 2198376297964, 365587270414697, 87628189849380625, 30044424979717359410, 14633141237888767056799, 10059886640779846047089825
Offset: 1

Views

Author

R. H. Hardin, Jun 11 2012

Keywords

Comments

Former name: Number of n X n symmetric binary matrices with zero diagonal and no three-node loops x(i,j)*x(j,k)*x(k,i) = 1, i < j < k.
From Brendan McKay, Jun 11 2021: (Start)
EXP transform of A345218.
Labeled version of A006785. (End)
a(n) is the number of sign mappings X:([n] choose 2) -> {+,-} such that for any ordered 3-tuple aManfred Scheucher, Jan 05 2024

Examples

			Some solutions for n=4:
  0 1 0 0     0 1 1 0     0 1 0 0     0 0 1 1     0 1 0 0
  1 0 1 0     1 0 0 1     1 0 0 0     0 0 1 0     1 0 0 1
  0 1 0 1     1 0 0 1     0 0 0 1     1 1 0 0     0 0 0 0
  0 0 1 0     0 1 1 0     0 0 1 0     1 0 0 0     0 1 0 0
		

Crossrefs

Extensions

a(11)-a(13) added using tinygraph by Falk Hüffner, Jun 19 2018
a(14)-a(15) added using tinygraph by Falk Hüffner, Oct 28 2019
a(16) added by Brendan McKay, Sep 15 2020
Name changed to the one suggested by Falk Hüffner and Brendan McKay, Jun 11 2021

A024607 Number of connected triangle-free graphs on n unlabeled nodes.

Original entry on oeis.org

1, 1, 1, 3, 6, 19, 59, 267, 1380, 9832, 90842, 1144061, 19425052, 445781050, 13743625184, 566756900370, 31125101479652
Offset: 1

Views

Author

Keywords

Crossrefs

Inverse Euler transform of A006785.
Table of graphs on n nodes with clique number k is A126744.
Column k=1 of A283417.

Extensions

2 more terms from Vladeta Jovovic, May 17 2008
2 more terms from A006785 by Martin Fuller, May 01 2015

A263340 Triangle read by rows: T(n,k) is the number of graphs with n vertices containing k triangles.

Original entry on oeis.org

1, 1, 2, 3, 1, 7, 2, 1, 0, 1, 14, 7, 5, 2, 3, 1, 0, 1, 0, 0, 1, 38, 23, 28, 14, 18, 9, 7, 5, 4, 1, 4, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 107, 102, 141, 117, 123, 92, 80, 63, 49, 35, 35, 23, 15, 17, 10, 4, 9, 5, 2, 3, 3, 2, 2, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Christian Stump, Oct 15 2015

Keywords

Comments

Row sums give A000088.
First column is A006785.
Row lengths are 1 + binomial(n,3). - Geoffrey Critzer, Apr 13 2017

Examples

			Triangle begins:
  1;
  1;
  2;
  3,1;
  7,2,1,0,1;
  14,7,5,2,3,1,0,1,0,0,1;
  38,23,28,14,18,9,7,5,4,1,4,1,1,1,0,0,1,0,0,0,1;
  ...
		

Crossrefs

Row sums are A000088, labeled A006125.
Column k = 0 is A006785 (lab A213434), covering A372169 (lab A372168).
Counting edges gives A008406 (lab A084546), covering A370167 (lab A054548).
Row lengths are A050407.
The labeled version is A372170, covering A372167.
The covering case is A372173, sums A002494, labeled A006129.
Column k = 1 is A372194 (lab A372172), covering A372174 (lab A372171).
A001858 counts acyclic graphs, unlabeled A005195.
A372176 counts labeled graphs by directed cycles, covering A372175.

Programs

  • Mathematica
    Table[Table[Count[Table[Tr[MatrixPower[AdjacencyMatrix[GraphData[{n, i}]], 3]]/6, {i, 1, NumberOfGraphs[n]}], k], {k, 0, Binomial[n, 3]}], {n, 1, 7}] (* Geoffrey Critzer, Apr 13 2017 *)

Extensions

Row 7 from Geoffrey Critzer, Apr 13 2017
T(0,0)=1 prepended by Alois P. Heinz, Apr 13 2017

A372169 Number of unlabeled triangle-free graphs covering n vertices.

Original entry on oeis.org

1, 0, 1, 1, 4, 7, 24, 69, 303, 1487, 10275, 92899, 1157109, 19534822, 447074367, 13764681083, 567227701549, 31139379910949
Offset: 0

Views

Author

Gus Wiseman, Apr 23 2024

Keywords

Comments

The labeled version is A372168.

Examples

			Non-isomorphic representatives of the a(5) = 7 graphs:
  12-35-45
  13-24-35-45
  14-25-35-45
  15-25-35-45
  12-13-24-35-45
  15-23-24-35-45
  13-14-23-24-35-45
		

Crossrefs

Dominated by A002494, labeled A006129.
Covering case of A006785, labeled A213434.
The connected case is A024607.
For all cycles (not just triangles) we have A144958, labeled A105784.
The labeled version is A372168.
For a unique triangle (labeled) we have A372171, non-covering A372172.
Column k = 0 of A372173, labeled A372167.
For a unique triangle (unlabeled) we have A372174, non-covering A372194.
A001858 counts acyclic graphs, unlabeled A005195.
A006125 counts simple graphs, unlabeled A000088.
A054548 counts covering graphs by number of edges, unlabeled A370167.
A372170 counts graphs by triangles, unlabeled A263340.

Formula

First differences of A006785.

A372170 Irregular triangle read by rows where T(n,k) is the number of labeled simple graphs with n vertices and exactly k triangles, 0 <= k <= binomial(n,3).

Original entry on oeis.org

1, 1, 2, 7, 1, 41, 16, 6, 0, 1, 388, 290, 195, 70, 40, 30, 0, 10, 0, 0, 1, 5789, 6980, 6910, 4560, 3030, 2292, 1230, 780, 600, 180, 236, 60, 45, 60, 0, 0, 15, 0, 0, 0, 1, 133501, 235270, 313705, 302505, 260890, 222509, 174615, 126780, 102970, 67165, 50134, 37485, 20370, 17990, 11445, 6552, 4515, 3570, 1680, 1785, 154, 735, 455, 140, 0, 105, 105, 0, 0, 0, 21, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Gus Wiseman, Apr 23 2024

Keywords

Examples

			Triangle begins:
     1
     1
     2
     7    1
    41   16    6    0    1
   388  290  195   70   40   30    0   10    0    0    1
   ...
For example, the T(4,1) = 16 graphs are:
  12-13-23
  12-14-24
  13-14-34
  23-24-34
  12-13-14-23
  12-13-14-24
  12-13-14-34
  12-13-23-24
  12-13-23-34
  12-14-23-24
  12-14-24-34
  12-23-24-34
  13-14-23-34
  13-14-24-34
  13-23-24-34
  14-23-24-34
		

Crossrefs

Row sums are A006125, covering A006129.
Row lengths are A050407.
Counting edges instead of triangles gives A084546, covering A054548.
Column k = 0 is A213434, covering A372168.
The unlabeled version is A263340.
The covering case is A372167, unlabeled A372173.
Column k = 1 is A372172, covering A372171.
For all cycles (not just triangles) we have A372176, covering A372175.
A001858 counts acyclic graphs, unlabeled A005195.
A367867 counts non-choosable graphs, covering A367868.
A372193 counts unicyclic graphs, unlabeled A236570, covering A372191.

Programs

  • Mathematica
    cys[y_]:=Select[Subsets[Union@@y,{3}],MemberQ[y,{#[[1]],#[[2]]}]&&MemberQ[y,{#[[1]],#[[3]]}]&&MemberQ[y,{#[[2]],#[[3]]}]&];
    Table[Length[Select[Subsets[Subsets[Range[n],{2}]],Length[cys[#]]==k&]],{n,0,5},{k,0,Binomial[n,3]}]

Formula

Binomial transform of columns of A372167.

Extensions

a(42) onwards from Andrew Howroyd, Dec 29 2024

A372194 Number of unlabeled graphs with n vertices and a unique triangle.

Original entry on oeis.org

0, 0, 0, 1, 2, 7, 23, 102, 526, 3624, 32240, 382095, 5986945
Offset: 0

Views

Author

Gus Wiseman, Apr 24 2024

Keywords

Comments

The labeled version is A372172.

Examples

			Representatives of the a(3) = 1 through a(6) = 23 graphs:
    12,13,23    12,13,23       12,13,23             12,13,23
                14,23,24,34    12,34,35,45          12,34,35,45
                               14,23,24,34          14,23,24,34
                               12,25,34,35,45       12,25,34,35,45
                               14,25,34,35,45       12,36,45,46,56
                               15,25,34,35,45       13,23,45,46,56
                               12,14,25,34,35,45    14,25,34,35,45
                                                    15,25,34,35,45
                                                    12,14,25,34,35,45
                                                    12,23,36,45,46,56
                                                    13,23,36,45,46,56
                                                    13,25,36,45,46,56
                                                    13,26,36,45,46,56
                                                    14,25,36,45,46,56
                                                    15,26,36,45,46,56
                                                    16,26,36,45,46,56
                                                    12,13,25,36,45,46,56
                                                    12,13,26,36,45,46,56
                                                    13,23,25,36,45,46,56
                                                    14,23,25,36,45,46,56
                                                    16,23,25,36,45,46,56
                                                    13,14,23,25,36,45,46,56
                                                    13,15,23,25,36,45,46,56
		

Crossrefs

For no triangles we have A006785, covering A372169.
Column k = 1 of A263340, covering A372173.
The labeled version is A372172.
The covering case is A372174, labeled A372171.
For all cycles (not just triangles): A236570, A372193, A372191, A372195.
A000088 counts unlabeled graphs, labeled A006125.
A001858 counts acyclic graphs, unlabeled A005195.
A002494 counts unlabeled covering graphs, labeled A006129.
A372176 counts labeled graphs by directed cycles, covering A372175.

Programs

Formula

First differences are A372174.

Extensions

a(11)-a(12) added by Georg Grasegger, Aug 03 2024

A052450 Number of n-node simple graphs having clique number 2.

Original entry on oeis.org

0, 1, 2, 6, 13, 37, 106, 409, 1896, 12171, 105070, 1262179, 20797001, 467871368, 14232552451, 581460254000, 31720840164949
Offset: 1

Views

Author

Keywords

Crossrefs

a(n) = A006785(n) - 1. - Falk Hüffner, Nov 20 2015

Extensions

2 more terms from Eric W. Weisstein, Nov 03 2002
a(10) from Keith Briggs, Mar 15 2006
a(11) from Michael Sollami, Jan 29 2012
a(12) from Michael Sollami, Mar 26 2012
More terms added using A006785 by Falk Hüffner, Nov 20 2015

A128236 Number of n-node (unlabeled) graphs with girth 3.

Original entry on oeis.org

1, 4, 20, 118, 937, 11936, 272771, 11992996, 1018892793, 165089910412, 50502010570950, 29054155189364119, 31426485955571756316, 64001015703946097640927, 245935864153501211843554826
Offset: 3

Views

Author

Keith Briggs, May 05 2007

Keywords

Crossrefs

a(n) = A000088(n) - A006785(n).

Extensions

Corrected and extended by Martin Fuller, May 01 2015
Showing 1-10 of 25 results. Next