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

A000060 Number of signed trees with n nodes.

Original entry on oeis.org

1, 2, 3, 10, 27, 98, 350, 1402, 5743, 24742, 108968, 492638, 2266502, 10600510, 50235931, 240882152, 1166732814, 5702046382, 28088787314, 139355139206, 695808554300, 3494391117164, 17641695461662, 89495028762682, 456009893224285, 2332997356507678, 11980753878699716, 61739654456234062, 319188605907760846
Offset: 1

Views

Author

Keywords

Comments

If only trees with a degree of each node <= 2 (linear chains) are counted, we obtain A005418. If only trees with a degree of each node <= 3 are counted, we obtain 1, 2, 3, 10, 22, 76, 237, 856, ... If the degree is restricted to <= 4 we obtain 1, 2, 3, 10, 27, 92, 323, 1260, ... - R. J. Mathar, Feb 26 2018

Examples

			For n=4 nodes and 3 edges, the unsigned tree has two forms: the star and the linear chain. The star has 4 ways of signing its 3 edges: without plus (3 minus'), with one plus (2 minus'), with two plusses (1 minus) and with three plusses (no minus).  The linear chain has 6 ways of signing the edges: +++, ---, +-- (equivalent to --+), -++ (equivalent to ++-), -+- and +-+. The total number of ways is a(4) = 4+6=10. - _R. J. Mathar_, Feb 26 2018
		

References

  • 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

Row sums of A302939.

Programs

  • Maple
    unassign('x'): with(combstruct): norootree:=[S, {B = Set(S), S = Prod(Z,B,B)}, unlabeled]: S:=x->add(count(norootree,size=i)*x^i,i=1..30): seq(coeff(S(x)+S(x^2)-S(x)^2,x,i),i=1..29); # with Algolib (Pab Ter)
  • Mathematica
    b[M_] := Module[{A}, A = Table[1, {M}]; For[n = 1, n <= M-1, n++, A[[n+1]] = 2/n*Sum[Sum[d*A[[d]], {d, Divisors[i]}]*A[[n-i+1]], {i, 1, n}]]; A];
    seq[n_] := Module[{g}, g = x*(b[n].x^Range[0, n-1]); CoefficientList[g + (g /. x -> x^2) - g^2, x]][[2 ;; n+1]];
    seq[29] (* Jean-François Alcover, Sep 04 2019, after Andrew Howroyd *)
  • PARI
    \\ here b(N) is A000151 as vector
    b(N) = {my(A=vector(N, j, 1)); for (n=1, N-1, A[n+1] = 2/n * sum(i=1, n, sumdiv(i, d, d*A[d]) * A[n-i+1] ) ); A}
    seq(n) = {my(g=x*Ser(b(n))); Vec(g + subst(g, x, x^2) - g^2)} \\ Andrew Howroyd, May 13 2018

Formula

G.f.: S(x) + S(x^2) - S(x)^2, where S(x) is the generating function for A000151. - Pab Ter (pabrlos2(AT)yahoo.com), Oct 12 2005
a(n) = A000238(n) + A000151(n/2), where A000151(.) is zero for non-integer arguments. - R. J. Mathar, Apr 16 2018

Extensions

More terms from Pab Ter (pabrlos2(AT)yahoo.com), Oct 12 2005

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).

A321305 Triangle T(n,f): the number of signed cubic graphs on 2n vertices with f edges of the first sign.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 1, 2, 3, 2, 1, 1, 2, 3, 8, 16, 21, 21, 16, 8, 3, 2, 5, 14, 57, 152, 313, 474, 551, 474, 313, 152, 57, 14, 5, 19, 91, 491, 1806, 5034, 10604, 17318, 22033, 22033, 17318, 10604, 5034, 1806, 491, 91, 19, 85, 706, 4981, 23791, 84575, 229078, 487020, 825127, 1127783, 1250632, 1127783, 825127, 487020, 229078, 84575, 23791, 4981, 706, 85
Offset: 0

Views

Author

R. J. Mathar, Nov 03 2018

Keywords

Comments

These are connected, undirected, simple cubic graphs where each edge is signed as either "+" or "-". Row n has 1+3n entries, 0<=f<=3n. The column f=0 (1, 0, 1, 2, 5,...) counts the cubic graphs (A002851). The column f=1 (0, 1, 3, 14, 91, 706,...) counts the edge-rooted cubic graphs.

Examples

			The triangle starts:
0 vertices: 1
2 vertices: 0,0,0,0
4 vertices: 1,1,2,3,2,1,1
6 vertices: 2,3,8,16,21,21,16,8,3,2
8 vertices: 5,14,57,152,313,474,551,474,313,152,57,14,5
10 vertices: 19,91,491,1806,5034,10604,17318,22033,22033,17318,10604,5034,1806,491,91,19
		

Crossrefs

Cf. A002851 (first column), A321304 (signed vertices), A302939 (signed trees).

Formula

T(n,f) = T(n,3*n-f).
Showing 1-4 of 4 results.