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.

A294783 Number of trees with n bicolored nodes and f nodes of the first color. Triangle T(n,f) read by rows, 0<=f<=n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 4, 6, 4, 2, 3, 9, 15, 15, 9, 3, 6, 20, 43, 51, 43, 20, 6, 11, 48, 116, 175, 175, 116, 48, 11, 23, 115, 329, 573, 698, 573, 329, 115, 23, 47, 286, 918, 1866, 2626, 2626, 1866, 918, 286, 47, 106, 719, 2609, 5978, 9656, 11241, 9656, 5978, 2609, 719, 106, 235, 1842
Offset: 0

Views

Author

R. J. Mathar, Apr 16 2018

Keywords

Examples

			The triangle starts
    1;
    1,   1;
    1,   1,   1;
    1,   2,   2,    1;
    2,   4,   6,    4,    2;
    3,   9,  15,   15,    9,    3;
    6,  20,  43,   51,   43,   20,    6;
   11,  48, 116,  175,  175,  116,   48,  11;
   23, 115, 329,  573,  698,  573,  329, 115,  23;
   47, 286, 918, 1866, 2626, 2626, 1866, 918, 286, 47;
  106, 719,2609, 5978, 9656,11241, 9656,5978,2609,719,106;
  235,1842,
		

Crossrefs

Cf. A038056 (row sums), A000055 (diagonal and 1st column), A000081 (subdiagonal and 2nd column), A303833 (3rd column), A303843 (4th column), A304311 (connected graphs), A304489 (rooted).

Programs

  • PARI
    R(n, y)={my(v=vector(n)); v[1]=1; for(k=1, n-1, my(p=(1+y)*v[k]); my(q=Vec(prod(j=0, poldegree(p,y), (1/(1-x*y^j) + O(x*x^(n\k)))^polcoeff(p,j)))); v=vector(n, j, v[j] + sum(i=1, (j-1)\k, v[j-i*k] * q[i+1]))); v;}
    M(n)={my(B=(1+y)*x*Ser(R(n,y))); 1 + B - (B^2 - substvec(B, [x,y], [x^2,y^2]))/2}
    { my(A=M(10)); for(n=0, #A-1, print(Vecrev(polcoeff(A, n)))) } \\ Andrew Howroyd, May 12 2018

Formula

T(n,f) = T(n,n-f), flipping all node colors.

Extensions

Row 10 completed. - R. J. Mathar, Apr 29 2018

A302939 Number of signed trees with n nodes and p positive edges. Triangle T(n,p) read by rows, 0<=p

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 3, 3, 2, 3, 6, 9, 6, 3, 6, 16, 27, 27, 16, 6, 11, 37, 79, 96, 79, 37, 11, 23, 96, 233, 349, 349, 233, 96, 23, 47, 239, 679, 1187, 1439, 1187, 679, 239, 47, 106, 622, 1987, 4017, 5639, 5639, 4017, 1987, 622, 106, 235, 1607, 5784, 13216, 21263, 24758, 21263, 13216, 5784, 1607, 235
Offset: 1

Views

Author

R. J. Mathar, Apr 16 2018

Keywords

Examples

			T(2,0)=T(2,1)=1: the tree on 2 nodes (one edge) has one variant with no positive edge and one variant with one positive edge.
T(4,1)=3: the 2 trees on 4 nodes (three edges) have two variants from the linear tree with a positive edge (edge in the middle or at the end) and one variant from the star graph with one positive edge.
T(5,0)=3: there are 3 trees on 5 nodes (4 edges) where all edges are negative.
The triangle starts
    1;
    1,   1;
    1,   1,   1;
    2,   3,   3,    2;
    3,   6,   9,    6,    3;
    6,  16,  27,   27,   16,    6;
   11,  37,  79,   96,   79,   37,  11;
   23,  96, 233,  349,  349,  233,  96,  23;
   47, 239, 679, 1187, 1439, 1187, 679, 239, 47;
  106, 622,...
		

Crossrefs

Cf. A000060 (row sums), A000055 (diagonal and 1st column), A027852 (subdiagonal and 2nd column), A304489 (rooted), A331113 (central coefficients).

Programs

  • PARI
    R(n, y)={my(v=vector(n)); v[1]=1; for(k=1, n-1, my(p=(1+y)*v[k]); my(q=Vec(prod(j=0, poldegree(p, y), (1/(1-x*y^j) + O(x*x^(n\k)))^polcoeff(p, j)))); v=vector(n, j, v[j] + sum(i=1, (j-1)\k, v[j-i*k] * q[i+1]))); v; }
    M(n)={my(B=x*Ser(R(n, y))); B - (1+y)*(B^2 - substvec(B, [x, y], [x^2, y^2]))/2}
    { my(A=Vec(M(10))); for(n=1, #A, print(Vecrev(A[n]))) } \\ Andrew Howroyd, May 13 2018

Formula

T(n,p) = T(n,n-p-1), flipping all edge signs.

Extensions

Completed row 10. - R. J. Mathar, Apr 29 2018
Terms a(58) and beyond from Andrew Howroyd, May 13 2018

A331114 Number of rooted trees with 2-colored non-root nodes with an n nodes of each color.

Original entry on oeis.org

1, 3, 37, 596, 11513, 245356, 5597060, 133950215, 3323281496, 84787933926, 2212123329500, 58779046239904, 1585796125188065, 43337540217740908, 1197492197496481744, 33406620056723507124, 939775084670916268134, 26632926871927867655261, 759732892913483065912296
Offset: 0

Views

Author

Andrew Howroyd, Jan 09 2020

Keywords

Comments

The total number of nodes including the root is 2n + 1.

Examples

			a(1) = 3 because there are three trees with one root node and one additional node of each color:
   1 -- o -- 2,
   o -- 1 -- 2,
   o -- 2 -- 1.
		

Crossrefs

Formula

a(n) = A304489(2*n+1, n).
Showing 1-3 of 3 results.