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.

Previous Showing 41-50 of 60 results. Next

A136605 Triangle read by rows: T(n,k) = number of forests on n unlabeled nodes with k edges (n>=1, 0<=k<=n-1).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 3, 3, 1, 1, 2, 4, 6, 6, 1, 1, 2, 4, 7, 11, 11, 1, 1, 2, 4, 8, 14, 23, 23, 1, 1, 2, 4, 8, 15, 29, 46, 47, 1, 1, 2, 4, 8, 16, 32, 60, 99, 106, 1, 1, 2, 4, 8, 16, 33, 66, 128, 216, 235, 1, 1, 2, 4, 8, 16, 34, 69, 143, 284, 488, 551, 1, 1, 2, 4, 8, 16, 34, 70, 149, 315, 636, 1121, 1301
Offset: 1

Views

Author

N. J. A. Sloane, May 09 2008

Keywords

Examples

			Triangle begins:
1
1,1
1,1,1
1,1,2,2
1,1,2,3,3
1,1,2,4,6,6 <- T(6,3) = 4 forests on 6 nodes with 3 edges.
1,1,2,4,7,11,11
1,1,2,4,8,14,23,23
1,1,2,4,8,15,29,46,47
1,1,2,4,8,16,32,60,99,106
1,1,2,4,8,16,33,66,128,216,235
1,1,2,4,8,16,34,69,143,284,488,551
1,1,2,4,8,16,34,70,149,315,636,1121,1301
1,1,2,4,8,16,34,71,152,330,710,1467,2644,3159
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, pp. 58-59.

Crossrefs

Row sums give A005195. Rightmost diagonal gives A000055. Cf. A001858, A138464.
Rows converge to A215930. Reflected table is A095133. - Alois P. Heinz, Apr 11 2014

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; `if`(n<=1, n, (add(add(
          d*b(d), d=divisors(j)) *b(n-j), j=1..n-1))/ (n-1))
        end:
    t:= n-> `if`(n=0, 1, b(n)-(add(b(k)*b(n-k), k=0..n)-
            `if`(irem(n, 2)=0, b(n/2), 0))/2):
    g:= proc(n, i) option remember; `if`(n=0, 1,
          `if`(i<1, 0, expand(add(binomial(t(i)+j-1, j)*
           g(n-i*j, i-1)*x^j, j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, n-i), i=0..n-1))(g(n$2)):
    seq(T(n), n=1..14);  # Alois P. Heinz, Apr 11 2014
  • Mathematica
    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)]; t[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]; g[n_, i_] := g[n, i] = If[n == 0, 1, If[i < 1, 0, Expand[Sum[Binomial[t[i] + j - 1, j]*g[n - i*j, i-1]*x^j, {j, 0, n/i}]]]]; T[n_] := CoefficientList[g[n, n], x] // Reverse // Most; Table[T[n], {n, 1, 14}] // Flatten (* Jean-François Alcover, Apr 16 2014, after Alois P. Heinz *)

Formula

G.f.: Product_{k>=1} 1/(1 - y^(k-1)*x^k)^A000055(k). - Geoffrey Critzer, Nov 10 2014

A144215 Triangle read by rows: T(n,k) is the number of forests on n unlabeled nodes with all nodes of degree <= k (n>=1, 0 <= k <= n-1).

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 3, 5, 6, 1, 3, 7, 9, 10, 1, 4, 11, 17, 19, 20, 1, 4, 15, 28, 34, 36, 37, 1, 5, 22, 52, 67, 73, 75, 76, 1, 5, 30, 90, 129, 144, 150, 152, 153, 1, 6, 42, 170, 264, 305, 320, 326, 328, 329, 1, 6, 56, 310, 542, 645, 686, 701, 707, 709, 710
Offset: 1

Views

Author

N. J. A. Sloane, Dec 20 2008

Keywords

Examples

			Triangle begins:
  1
  1 2
  1 2  3
  1 3  5  6
  1 3  7  9 10
  1 4 11 17 19 20
  1 4 15 28 34 36 37
  ...
From _Andrew Howroyd_, Dec 18 2020: (Start)
Formatted as an array to show the full columns:
========================================================
n\k  | 0 1  2   3    4    5    6    7    8    9   10
-----+--------------------------------------------------
   1 | 1 1  1   1    1    1    1    1    1    1    1 ...
   2 | 1 2  2   2    2    2    2    2    2    2    2 ...
   3 | 1 2  3   3    3    3    3    3    3    3    3 ...
   4 | 1 3  5   6    6    6    6    6    6    6    6 ...
   5 | 1 3  7   9   10   10   10   10   10   10   10 ...
   6 | 1 4 11  17   19   20   20   20   20   20   20 ...
   7 | 1 4 15  28   34   36   37   37   37   37   37 ...
   8 | 1 5 22  52   67   73   75   76   76   76   76 ...
   9 | 1 5 30  90  129  144  150  152  153  153  153 ...
  10 | 1 6 42 170  264  305  320  326  328  329  329 ...
  11 | 1 6 56 310  542  645  686  701  707  709  710 ...
  12 | 1 7 77 600 1161 1431 1536 1577 1592 1598 1600 ...
(End)
		

Crossrefs

The final diagonal gives A005195.
Column k=2 is A000041.

Programs

  • PARI
    \\ Here V(n,k) gives column k of A144528.
    EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
    MSet(p,k)={my(n=serprec(p,x)-1); if(min(k,n)<1, 1 + O(x*x^n), polcoef(exp( sum(i=1, min(k,n), (y^i + O(y*y^k))*subst(p + O(x*x^(n\i)), x, x^i)/i ))/(1-y + O(y*y^k)), k, y))}
    V(n,k)={my(g=1+O(x)); for(n=2, n, g=x*MSet(g, k-1)); Vec(1 + x*MSet(g, k) + (subst(g, x, x^2) - g^2)/2)}
    M(n, m=n)={Mat(vector(m, k, EulerT(V(n,k-1)[2..1+n])~))}
    { my(T=M(12)); for(n=1, #T~, print(T[n, 1..n])) } \\ Andrew Howroyd, Dec 18 2020

Formula

Column k is Euler transform of column k of A144528. - Andrew Howroyd, Dec 18 2020

Extensions

Terms a(29) and beyond from Andrew Howroyd, Dec 18 2020

A263294 Triangle read by rows: T(n,k) is the number of unlabeled simple graphs with n vertices and treewidth k.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 5, 4, 1, 1, 9, 17, 6, 1, 1, 19, 72, 53, 10, 1, 1, 36, 323, 501, 168, 14, 1, 1, 75, 1639, 5889, 4163, 557, 21, 1, 1, 152, 9203, 81786, 138923, 42596, 1977, 29, 1
Offset: 1

Views

Author

Christian Stump, Oct 13 2015

Keywords

Comments

A graph without edges has treewidth 0, any other forest has treewidth 1, any other series parallel graph has treewidth 2. - Martin Rubey, May 10 2023

Examples

			Triangle begins:
  1;
  1,   1;
  1,   2,    1;
  1,   5,    4,     1;
  1,   9,   17,     6,      1;
  1,  19,   72,    53,     10,     1;
  1,  36,  323,   501,    168,    14,    1;
  1,  75, 1639,  5889,   4163,   557,   21,  1;
  1, 152, 9203, 81786, 138923, 42596, 1977, 29, 1;
  ...
		

Crossrefs

Columns k=2..3 are A362908, A362907.
Partial row sums include A000012, A005195, A000041.
Row sums are A000088.
T(n,n-2) = A000065(n).

Extensions

Corrected and extended by Martin Rubey, May 10 2023

A035056 Number of asymmetric forests with n nodes.

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 0, 1, 2, 4, 9, 21, 44, 96, 206, 450, 981, 2159, 4757, 10571, 23563, 52835, 118939, 269047, 610878, 1392677, 3186001, 7313882, 16842202, 38900699, 90098260, 209229601, 487077685, 1136549747, 2657859059, 6228447488, 14624515804, 34402798404
Offset: 0

Views

Author

Christian G. Bower, Oct 15 1998

Keywords

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, p. 301 and 562.

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(b((i-1)$2), j)*b(n-i*j, i-1), j=0..n/i)))
        end:
    g:= n-> b((n-1)$2):
    h:= proc(n) option remember; g(n)-add(g(i)*g(n-i), i=0..n)/2
           -`if`(irem(n, 2)=1, 0, g(n/2))/2
        end:
    f:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(h(i), j)*f(n-i*j, i-1), j=0..n/i)))
        end:
    a:= n-> f(n, n):
    seq(a(n), n=0..40);  # Alois P. Heinz, May 20 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, Sum[Binomial[b[i-1, i-1], j]*b[n-i*j, i-1], {j, 0, n/i}]]]; g[n_] := b[n-1, n-1]; h[n_] := h[n] = g[n] - Sum[g[i]*g[n-i], {i, 0, n}]/2 - If[Mod[n, 2]==1, 0, g[n/2]]/2; f[n_, i_] := f[n, i] = If[n==0, 1, If[i<1, 0, Sum[Binomial[h[i], j]*f[n - i*j, i-1], {j, 0, n/i}]]]; a[n_] := f[n, n]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 21 2016, after Alois P. Heinz *)

Formula

Weigh transform of A000220.
a(n) ~ c * d^n / n^(5/2), where d = A246169 = 2.51754035263200389079535..., c = 0.421943694962576031011358... . - Vaclav Kotesovec, Aug 25 2014

A215930 Number of forests on unlabeled nodes with n edges and no single node trees.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 34, 71, 154, 341, 768, 1765, 4134, 9838, 23766, 58226, 144353, 361899, 916152, 2339912, 6023447, 15617254, 40752401, 106967331, 282267774, 748500921, 1993727506, 5332497586, 14316894271, 38574473086, 104273776038, 282733466684, 768809041078
Offset: 0

Views

Author

Alois P. Heinz, Aug 27 2012

Keywords

Comments

Each forest counted by a(n) with n>0 has number of nodes from the interval [n+1,2*n] and number of trees in [1,n].
Also limiting sequence of reversed rows of A095133.
Differs from A011782 first at n=6 (32) and from A088325 at n=8 (153).

Examples

			a(0) = 1: (  ), the empty forest with 0 trees and 0 edges.
a(1) = 1: ( o-o ), 1 tree and 1 edge.                      o
a(2) = 2: ( o-o-o ), ( o-o o-o ).                          |
a(3) = 4: ( o-o-o-o ), ( o-o-o o-o ), ( o-o o-o o-o ), ( o-o-o ).
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; local d, j; `if`(n<=1, n,
          (add(add(d*b(d), d=divisors(j)) *b(n-j), j=1..n-1))/(n-1))
        end:
    t:= proc(n) option remember; local k; `if` (n=0, 1, b(n)-
          (add(b(k)*b(n-k), k=0..n)-`if`(irem(n, 2)=0, b(n/2), 0))/2)
        end:
    g:= proc(n, i, p) option remember; `if`(p>n, 0, `if`(n=0, 1,
          `if`(min(i, p)<1, 0, add(g(n-i*j, i-1, p-j)*
           binomial(t(i)+j-1, j), j=0..min(n/i, p)))))
        end:
    a:= n-> g(2*n, 2*n, n):
    seq(a(n), n=0..40);
  • Mathematica
    nn = 30; t[x_] := Sum[a[n] x^n, {n, 1, nn}]; a[0] = 0;
    a[1] = 1; sol =
    SolveAlways[
      0 == Series[
        t[x] - x Product[1/(1 - x^i)^a[i], {i, 1, nn}], {x, 0, nn}], x];
    b[x_] := Sum[a[n] x^n /. sol, {n, 0, nn}]; ft =
    Drop[Flatten[
       CoefficientList[Series[b[x] - (b[x]^2 - b[x^2])/2, {x, 0, nn}],
        x]], 1]; Drop[
    CoefficientList[
      Series[Product[1/(1 - y ^(i - 1))^ft[[i]], {i, 2, nn}], {y, 0, nn}],
    y], -1] (* Geoffrey Critzer, Nov 10 2014 *)

Formula

a(n) = A095133(2*n,n).
a(n) = A105821(2*n+1,n+1). - Alois P. Heinz, Jul 10 2013
a(n) = A136605(2*n+1,n). - Alois P. Heinz, Apr 11 2014
a(n) ~ c * d^n / n^(5/2), where d = A051491 = 2.955765285..., c = 3.36695186... . - Vaclav Kotesovec, Sep 10 2014

A331693 Number of Tom graphs with n vertices.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 37, 76, 153, 328, 705, 1576, 3551, 8179, 18980, 44559, 105111, 249426, 593484, 1416269, 3384581, 8099819, 19398194, 46487665, 111447044, 267260387, 641022947, 1537706522, 3688974818, 8850411933, 21234093757, 50946316856, 122234742311
Offset: 0

Views

Author

Bobby Jacobs, Jan 24 2020

Keywords

Comments

This sequence is from a Project Euler problem called "Tom and Jerry". A cat named Tom and a mouse named Jerry play a game on a graph G. Each vertex of G is a mousehole. Jerry starts in one of the vertices. Every day, Tom tries to catch Jerry in one of the holes. If there is a vertex adjacent to Jerry's hole, then Jerry moves to one of the adjacent holes. A Tom graph is a graph on which Tom can always catch Jerry by following a sequence of holes.
All Tom graphs are loop-free graphs, but not all loop-free graphs are Tom graphs. The smallest loop-free graph that is not a Tom graph has 10 vertices:
1
|
2
|
3
|
4
/ \
5 8
/ \
6 9
/ \
7 10
From Hugo Pfoertner, Feb 20 2020 (Start):
The sequence is an equivalent of A005195 (number of forests with n unlabeled nodes), but made from trees that don't have the unlabeled 10-node graph shown above as a subgraph. This is described in the comment of A300576 and there is also a link to Christian Perfect's website.
In order to find a term of the current sequence, the number of trees containing the shown subgraph must be subtracted from the total number A000055. For n = 10 this is exactly one, for n = 11 it is trivially 4 and for n = 12 it is 19 (A130132).
The marked illustrations from the Steinbach graph catalog show these manually counted tree graphs.
The formulas of A005195 (Euler transform) can then be used to calculate the number of forests if the reduced number of trees A130131 is used instead of A000055. (End)
a(0) = 1: the empty graph is a Tom graph, since Jerry cannot hide from Tom. - Rainer Rosenthal, Mar 01 2020

Examples

			The graph
  1---2---3
is a Tom graph: Tom can follow the sequence 2, 2 to guarantee that he catches Jerry.
The graph
    1
   / \
  2---3
is not a Tom graph: Jerry always has 2 vertices to go to, and whatever vertex Tom picks, Jerry can choose another to evade Tom.
		

Crossrefs

Formula

a(n) <= A005195(n) with equality only for n in {1, ..., 9}.

Extensions

a(11)-a(12) from Hugo Pfoertner, Feb 20 2020
a(0), a(13)-a(33) from Rainer Rosenthal, Feb 29 2020

A339788 Triangle read by rows: T(n,k) is the number of forests with n unlabeled vertices and maximum vertex degree k, (0 <= k < n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 4, 2, 1, 1, 3, 7, 6, 2, 1, 1, 3, 11, 13, 6, 2, 1, 1, 4, 17, 30, 15, 6, 2, 1, 1, 4, 25, 60, 39, 15, 6, 2, 1, 1, 5, 36, 128, 94, 41, 15, 6, 2, 1, 1, 5, 50, 254, 232, 103, 41, 15, 6, 2, 1, 1, 6, 70, 523, 561, 270, 105, 41, 15, 6, 2, 1
Offset: 1

Views

Author

Andrew Howroyd, Dec 18 2020

Keywords

Comments

A forest is an acyclic graph.
(The component trees here are not rooted. - N. J. A. Sloane, Dec 19 2020)

Examples

			Triangle begins:
  1;
  1, 1;
  1, 1,  1;
  1, 2,  2,   1;
  1, 2,  4,   2,   1;
  1, 3,  7,   6,   2,   1;
  1, 3, 11,  13,   6,   2,  1;
  1, 4, 17,  30,  15,   6,  2,  1;
  1, 4, 25,  60,  39,  15,  6,  2, 1;
  1, 5, 36, 128,  94,  41, 15,  6, 2, 1;
  1, 5, 50, 254, 232, 103, 41, 15, 6, 2, 1;
  ...
		

Crossrefs

Row sums are A005195.
Cf. A144215 (max degree <= k), A144528, A238414 (trees), A263293 (graphs).

Programs

  • PARI
    \\ Here V(n, k) gives column k of A144528.
    EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
    MSet(p,k)={my(n=serprec(p,x)-1); if(min(k,n)<1, 1 + O(x*x^n), polcoef(exp( sum(i=1, min(k,n), (y^i + O(y*y^k))*subst(p + O(x*x^(n\i)), x, x^i)/i ))/(1-y + O(y*y^k)), k, y))}
    V(n,k)={my(g=1+O(x)); for(n=2, n, g=x*MSet(g, k-1)); Vec(1 + x*MSet(g, k) + (subst(g, x, x^2) - g^2)/2)}
    M(n, m=n)={my(v=vector(m, k, EulerT(V(n,k-1)[2..1+n])~)); Mat(vector(m, k, v[k]-if(k>1, v[k-1])))}
    { my(T=M(12)); for(n=1, #T~, print(T[n, 1..n])) }

Formula

T(n,k) = A144215(n,k) - A144215(n,k-1) for k > 0.

A035054 Number of forests of identical trees.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 9, 12, 27, 49, 111, 236, 562, 1302, 3172, 7746, 19347, 48630, 123923, 317956, 823178, 2144518, 5623993, 14828075, 39300482, 104636894, 279794753, 751065509, 2023446206, 5469566586, 14830879661, 40330829031, 109972429568, 300628862717
Offset: 0

Views

Author

Christian G. Bower, Oct 15 1998

Keywords

Crossrefs

Cf. A005195.

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; `if`(n<=1, n,
          (add(add(d*b(d), d=divisors(j))*b(n-j), j=1..n-1))/(n-1))
        end:
    g:= proc(n) option remember; local k; `if`(n=0, 1, b(n)-
          (add(b(k)*b(n-k), k=0..n) -`if`(irem(n, 2)=0, b(n/2), 0))/2)
        end:
    a:= n-> `if`(n=0, 1, add(g(d), d=divisors(n))):
    seq(a(n), n=0..35);  # Alois P. Heinz, May 18 2013
  • Mathematica
    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)]; g[n_] := g[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]; a[n_] := If[n==0, 1, Sum[ g[d], {d, Divisors[n]}]]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Feb 19 2016, after Alois P. Heinz *)

Formula

Inverse Moebius transform of A000055.
a(n) ~ c * d^n / n^(5/2), where d = A051491 = 2.9557652856519949747148..., c = A086308 = 0.53494960614230701455... . - Vaclav Kotesovec, Aug 25 2014

A035055 Number of forests of different trees.

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 12, 24, 49, 105, 231, 517, 1188, 2783, 6643, 16101, 39606, 98605, 248287, 631214, 1618878, 4183964, 10889305, 28517954, 75111521, 198851386, 528929895, 1412993746, 3789733399, 10201625514, 27555373561, 74664487653, 202908119046, 552939614498
Offset: 0

Views

Author

Christian G. Bower, Oct 15 1998

Keywords

Crossrefs

Cf. A005195.

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; `if`(n<2, n,
          (add(add(d*b(d), d=divisors(j))*b(n-j), j=1..n-1))/(n-1))
        end:
    h:= proc(n) option remember; `if`(n=0, 1, b(n)-(add(b(k)*b(n-k),
          k=0..n) -`if`(irem(n, 2)=0, b(n/2), 0))/2)
        end:
    g:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(h(i), j)*g(n-i*j, i-1), j=0..n/i)))
        end:
    a:= n-> g(n, n):
    seq(a(n), n=0..40); # Alois P. Heinz, May 19 2013
  • Mathematica
    nn = 20; t[x_] := Sum[a[n] x^n, {n, 1, nn}]; a[0] = 0;
    b = Flatten[
      sol = SolveAlways[
        0 == Series[
          t[x] - x Product[1/(1 - x^i)^ a[i], {i, 1, nn}], {x, 0, nn}],
        x]; Table[a[n], {n, 0, nn}] /. sol];
    r[x_] := Sum[b[[n]] x^(n - 1), {n, 1, nn + 1}]; c =
    Drop[CoefficientList[
       Series[r[x] - (r[x]^2/2 - r[x^2]/2), {x, 0, nn}], x],
      1]; CoefficientList[
    Series[Product[(1 + x^i)^c[[i]], {i, 1, nn}], {x, 0, nn}], x] (* Geoffrey Critzer, Nov 15 2014 *)

Formula

Weigh transform of A000055.
a(n) ~ c * d^n / n^(5/2), where d = A051491 = 2.9557652856519949747148175..., c = 0.89246007934060351292465521837... . - Vaclav Kotesovec, Aug 25 2014

A286743 Number of (not necessarily connected) simple cyclic graphs on n vertices.

Original entry on oeis.org

0, 0, 1, 5, 24, 136, 1007, 12270, 274515, 12004839, 1018997154, 165091170991, 50502031364294, 29054155657226889, 31426485969804288254, 64001015704527557845023, 245935864153532932683596813, 1787577725145611700547877883649, 24637809253125004524383007490657239
Offset: 1

Views

Author

Eric W. Weisstein, May 13 2017

Keywords

Crossrefs

Cf. A000088 (number of simple graphs on n vertices).
Cf. A005195 (number of forests with n unlabeled nodes).
Cf. A241841 (number of simple connected graphs on n nodes that are not trees, i.e., number of connected cyclic graphs).

Formula

a(n) = A000088(n) - A005195(n).
Previous Showing 41-50 of 60 results. Next