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

A304489 Triangle read by rows: T(n,k) = number of rooted signed trees with n nodes and k positive edges (0 <= k < n).

Original entry on oeis.org

1, 1, 1, 2, 3, 2, 4, 9, 9, 4, 9, 26, 37, 26, 9, 20, 75, 134, 134, 75, 20, 48, 214, 469, 596, 469, 214, 48, 115, 612, 1577, 2445, 2445, 1577, 612, 115, 286, 1747, 5204, 9480, 11513, 9480, 5204, 1747, 286, 719, 4995, 16865, 35357, 50363, 50363, 35357, 16865, 4995, 719
Offset: 1

Views

Author

Andrew Howroyd, May 13 2018

Keywords

Comments

Equivalently, the number of rooted trees with 2-colored non-root nodes, n nodes and k nodes of the first color.

Examples

			Triangle begins:
    1;
    1,    1;
    2,    3,    2;
    4,    9,    9,    4;
    9,   26,   37,   26,     9;
   20,   75,  134,  134,    75,   20;
   48,  214,  469,  596,   469,  214,   48;
  115,  612, 1577, 2445,  2445, 1577,  612,  115;
  286, 1747, 5204, 9480, 11513, 9480, 5204, 1747, 286;
  ...
		

Crossrefs

Row sums are A000151.
Columns k=0..1 are A000081, A000243.

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; }
    { my(A=R(10,y)); for(n=1, #A, print(Vecrev(A[n]))) }
    
  • PARI
    EulerMT(u)={my(n=#u, p=x*Ser(u), vars=variables(p)); Vec(exp( sum(i=1, n, substvec(p + O(x*x^(n\i)), vars, apply(v->v^i,vars))/i ))-1)}
    R(n, y)={my(v=[1]); for(k=2,n,v=concat([1], EulerMT(v*(1+y)))); v}
    { my(A=R(10,y)); for(n=1, #A, print(Vecrev(A[n]))) }

A331113 Number of signed trees with n positive edges and n negative edges.

Original entry on oeis.org

1, 1, 9, 96, 1439, 24758, 476056, 9841611, 214997756, 4900190330, 115530636036, 2800145556058, 69446136484047, 1756114394736162, 45152546920446518, 1177790435393100588, 31111743336031473800, 831007304851753985293, 22416683345590695488558, 610057933331757664054671
Offset: 0

Views

Author

Andrew Howroyd, Jan 09 2020

Keywords

Comments

The total number of nodes is 2n + 1. Trees are unrooted.

Crossrefs

Formula

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