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

A002995 Number of unlabeled planar trees (also called plane trees) with n nodes.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 6, 14, 34, 95, 280, 854, 2694, 8714, 28640, 95640, 323396, 1105335, 3813798, 13269146, 46509358, 164107650, 582538732, 2079165208, 7457847082, 26873059986, 97239032056, 353218528324, 1287658723550, 4709785569184
Offset: 0

Views

Author

Keywords

Comments

Noncrossing handshakes of 2(n-1) people (each using only one hand) on round table, up to rotations - Antti Karttunen, Sep 03 2000
Equivalently, the number of noncrossing partitions up to rotation composed of n-1 blocks of size 2. - Andrew Howroyd, May 04 2018
a(n), n>2, is also the number of oriented cacti on n-1 unlabeled nodes with all cutpoints of separation degree 2, i.e. ones shared only by two (cyclic) blocks. These are digraphs (without loops) that have a unique Eulerian tour. Such digraphs with labeled nodes are enumerated by A102693. - Valery A. Liskovets, Oct 19 2005
Labeled plane trees are counted by A006963. - David Callan, Aug 19 2014
This sequence is similar to A000055 but those trees are not embedded in a plane. - Michael Somos, Aug 19 2014

Examples

			G.f. = 1 + x + x^2 + x^3 + 2*x^4 + 3*x^5 + 6*x^6 + 14*x^7 + 34*x^8 + 95*x^9 + ...
a(7) = 14 = 11 + 3 because there are 11 trees with 7 nodes but three of them can be embedded in a plane in two ways. These three trees have degree sequences 4221111, 3321111, 3222111, where there are two trees with each degree sequence but in the first, the two nodes of degree two are adjacent, in the second, the two nodes of degree three are adjacent, and in the third, the node of degree three is adjacent to two nodes of degree two. - _Michael Somos_, Aug 19 2014
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 304.
  • A. Errera, De quelques problèmes d'analysis situs, Comptes Rend. Congr. Nat. Sci. Bruxelles, (1930), 106-110.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 67, (3.3.26).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    with (powseries): with (combstruct): n := 27: Order := n+2: sys := {C = Cycle(B), B = Union(Z,Prod(B,B))}: G003239 := (convert(gfseries(sys,unlabeled,x) [C(x)], polynom)) / x: G000108 := convert(taylor((1-sqrt(1-4*x)) / (2*x),x),polynom): G002995 := 1 + G003239 + (eval(G000108,x=x^2) - G000108^2)/2: A002995 := 1,1,1,seq(coeff(G002995,x^i),i=1..n); # Ulrich Schimke, Apr 05 2002
    with(combinat): with(numtheory): m := 2: for p from 2 to 28 do s1 := 0: s2 := 0: for d from 1 to p do if p mod d = 0 then s1 := s1+phi(p/d)*binomial(m*d, d) fi: od: for d from 1 to p-1 do if gcd(m, p-1) mod d = 0 then s2 := s2+phi(d)*binomial((p*m)/d, (p-1)/d) fi: od: printf(`%d, `, (s1+s2)/(m*p)-binomial(m*p, p)/(p*(m-1)+1)) od : # Zerinvary Lajos, Dec 01 2006
  • Mathematica
    a[0] = a[1] = 1; a[n_] := (1/(2*(n-1)))*Sum[ EulerPhi[(n-1)/d]*Binomial[2*d, d], {d, Divisors[n-1]}] - CatalanNumber[n-1]/2 + If[ EvenQ[n], CatalanNumber[n/2-1]/2, 0]; Table[ a[n], {n, 0, 29}] (* Jean-François Alcover, Mar 07 2012, from formula *)
  • PARI
    catalan(n) = binomial(2*n, n)/(n+1);
    a(n) = if (n<2, 1, n--; sumdiv(n, d, eulerphi(n/d)*binomial(2*d, d))/(2*n) - catalan(n)/2 + if ((n-1) % 2, 0, catalan((n-1)/2)/2)); \\ Michel Marcus, Jan 23 2016

Formula

G.f.: 1+B(x)+(C(x^2)-C(x)^2)/2 where B is g.f. of A003239 and C is g.f. of A000108(n-1).
a(n) = 1/(2*(n-1))*sum{d|(n-1)}(phi((n-1)/d)*binomial(2d, d)) - A000108(n-1)/2 + (if n is even) A000108(n/2-1)/2.

Extensions

More terms, formula from Christian G. Bower, Dec 15 1999
Name corrected ("labeled" --> "unlabeled") by David Callan, Aug 19 2014

A303694 Array read by antidiagonals: T(n,k) is the number of noncrossing partitions up to rotation composed of n blocks of size k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 3, 7, 6, 1, 1, 1, 1, 3, 11, 19, 14, 1, 1, 1, 1, 4, 17, 52, 86, 34, 1, 1, 1, 1, 4, 25, 102, 307, 372, 95, 1, 1, 1, 1, 5, 33, 187, 811, 1936, 1825, 280, 1, 1, 1, 1, 5, 43, 300, 1772, 6626, 13207, 9143, 854, 1
Offset: 0

Views

Author

Andrew Howroyd, Apr 28 2018

Keywords

Comments

Also, the number of unlabeled planar k-gonal cacti having n polygons.
The number of noncrossing partitions counted distinctly is given by A070914(n,k-1).

Examples

			Array begins:
==================================================================
n\k| 1   2    3     4      5       6       7        8        9
---+--------------------------------------------------------------
0  | 1   1    1     1      1       1       1        1        1 ...
1  | 1   1    1     1      1       1       1        1        1 ...
2  | 1   1    1     1      1       1       1        1        1 ...
3  | 1   2    2     3      3       4       4        5        5 ...
4  | 1   3    7    11     17      25      33       43       55 ...
5  | 1   6   19    52    102     187     300      463      663 ...
6  | 1  14   86   307    811    1772    3412     5993     9821 ...
7  | 1  34  372  1936   6626   17880   40770    82887   154079 ...
8  | 1  95 1825 13207  58385  191967  518043  1213879  2558305 ...
9  | 1 280 9143 93496 532251 2141232 6830545 18471584 44121134 ...
...
		

Crossrefs

Programs

  • Mathematica
    T[0, _] = 1;
    T[n_, k_] := (DivisorSum[n, EulerPhi[n/#] Binomial[k #, #]&] + DivisorSum[ GCD[n-1, k], EulerPhi[#] Binomial[n k/#, (n-1)/#]&])/(k n) - Binomial[k n, n]/(n (k-1) + 1);
    Table[T[n-k, k], {n, 0, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, May 22 2018 *)
  • PARI
    T(n,k)={if(n==0, 1, (sumdiv(n,d,eulerphi(n/d)*binomial(k*d,d)) + sumdiv(gcd(n-1,k), d, eulerphi(d)*binomial(n*k/d, (n-1)/d)))/(k*n) - binomial(k*n,n)/(n*(k-1)+1))}

Formula

T(n,k) = ((Sum_{d|n} phi(n/d)*binomial(k*d,d)) + (Sum_{d|gcd(n-1,k)} phi(d) * binomial(n*k/d, (n-1)/d)))/(k*n) - binomial(k*n,n)/(n*(k-1)+1) for n > 0.
T(n,k) ~ A070914(n,k-1)/(n*k) for fixed k > 1.

A302828 Array read by antidiagonals: T(n,k) = number of noncrossing path sets on k*n nodes up to rotation and reflection with each path having exactly k nodes.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 2, 1, 1, 3, 21, 22, 3, 1, 1, 6, 111, 494, 201, 6, 1, 1, 10, 604, 9400, 18086, 2244, 12, 1, 1, 20, 3196, 157040, 1141055, 794696, 29096, 27, 1, 1, 36, 16528, 2342480, 55967596, 161927208, 38695548, 404064, 65, 1
Offset: 0

Views

Author

Andrew Howroyd, May 01 2018

Keywords

Examples

			Array begins:
=======================================================
n\k| 1  2     3        4           5              6
---+---------------------------------------------------
0  | 1  1     1        1           1              1 ...
1  | 1  1     1        2           3              6 ...
2  | 1  1     4       21         111            604 ...
3  | 1  2    22      494        9400         157040 ...
4  | 1  3   201    18086     1141055       55967596 ...
5  | 1  6  2244   794696   161927208    23276467936 ...
6  | 1 12 29096 38695548 25334545270 10673231900808 ...
...
		

Crossrefs

Columns 2..4 are A006082(n+1), A303330, A303867.
Row n=1 is A005418(k-2).

Programs

  • Mathematica
    nmax = 10; seq[n_, k_] := Module[{p, q, h, c}, p = 1 + InverseSeries[ x/(k*2^(k - 3)*(1 + x)^k) + O[x]^n, x]; h = p /. x -> x^2 + O[x]^n; q = x*D[p, x]/p; c = Integrate[((p - 1)/k + Sum[EulerPhi[d]*(q /. x -> x^d + O[x]^n), {d, 2, n}])/x, x] + If[OddQ[k], 0, 2^(k/2 - 2)*x*h^(k/2)]; If[k == 1, 2/(1 - x) + O[x]^n, 3/2 + c + If[OddQ[k], h + x^2*2^(k - 3)*h^k + x*2^((k - 1)/2)*h^((k + 1)/2), If[k == 2, x*h, 0] + h/(1 - 2^(k/2 - 1)*x*h^(k/2))]/2]/2];
    Clear[col]; col[k_] := col[k] = CoefficientList[seq[nmax, k], x];
    T[n_, k_] := col[k][[n + 1]];
    Table[T[n - k, k], {n, 0, nmax}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jul 04 2018, after Andrew Howroyd *)
  • PARI
    seq(n,k)={ \\ gives gf of k'th column
    my(p=1 + serreverse( x/(k*2^(k-3)*(1 + x)^k) + O(x*x^n) ));
    my(h=subst(p,x,x^2+O(x*x^n)), q=x*deriv(p)/p);
    my(c=intformal( ((p-1)/k + sum(d=2,n,eulerphi(d)*subst(q,x,x^d+O(x*x^n))))/x) + if(k%2, 0, 2^(k/2-2)*x*h^(k/2)));
    if(k==1, 2/(1-x) + O(x*x^n), 3/2 + c + if(k%2, h + x^2*2^(k-3)*h^k + x*2^((k-1)/2)*h^((k+1)/2), if(k==2,x*h,0) + h/(1-2^(k/2-1)*x*h^(k/2)) )/2)/2;
    }
    Mat(vector(6, k, Col(seq(7, k))))

A303865 Number of noncrossing path sets on 3*n nodes up to rotation with each path having exactly 3 nodes.

Original entry on oeis.org

1, 1, 6, 38, 384, 4425, 57976, 807318, 11828706, 179826245, 2816100678, 45170552490, 739103543356, 12297976924176, 207577047945312, 3547290764931730, 61277684496311364, 1068648890500799799, 18794421104465407618, 333037302131948734566, 5941487005826379359448
Offset: 0

Views

Author

Andrew Howroyd, May 01 2018

Keywords

Crossrefs

Column 3 of A303864.

Programs

  • Mathematica
    seq[n_] := Module[{p, q}, p = 1 + InverseSeries[x/(3*(1 + x)^3) + O[x]^n]; q = x*D[p, x]/p; Integrate[((p - 1)/3 + Sum[EulerPhi[d]*(q /. x -> x^d + O[x]^n), {d, 2, n}])/x, x] + 1];
    CoefficientList[seq[21], x] (* Jean-François Alcover, Jul 05 2018, after Andrew Howroyd *)
  • PARI
    seq(n)={ my(p=1 + serreverse( x/(3*(1 + x)^3) + O(x*x^n) )); my(q=x*deriv(p)/p);
    Vec(intformal(((p-1)/3 + sum(d=2, n, eulerphi(d)*subst(q, x, x^d+O(x*x^n))))/x) + 1)}

Formula

a(n) ~ 3^(4*n - 1/2) / (sqrt(Pi) * n^(5/2) * 2^(2*n + 2)). - Vaclav Kotesovec, Jun 01 2022

A303869 Triangle read by rows: T(n,k) = number of noncrossing path sets on n nodes up to rotation with k paths and isolated vertices allowed.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 4, 2, 1, 4, 11, 8, 2, 1, 10, 34, 39, 16, 3, 1, 16, 92, 144, 90, 25, 3, 1, 36, 256, 545, 473, 197, 40, 4, 1, 64, 672, 1878, 2184, 1246, 370, 56, 4, 1, 136, 1762, 6296, 9436, 7130, 2910, 658, 80, 5, 1, 256, 4480, 20100, 38025, 36690, 19698, 6090, 1080, 105, 5, 1
Offset: 1

Views

Author

Andrew Howroyd, May 01 2018

Keywords

Examples

			Triangle begins:
    1;
    1,    1;
    1,    1,    1;
    3,    4,    2,    1;
    4,   11,    8,    2,    1;
   10,   34,   39,   16,    3,    1;
   16,   92,  144,   90,   25,    3,   1;
   36,  256,  545,  473,  197,   40,   4,  1;
   64,  672, 1878, 2184, 1246,  370,  56,  4, 1;
  136, 1762, 6296, 9436, 7130, 2910, 658, 80, 5, 1;
  ...
		

Crossrefs

Row sums are A303836.
Column 1 is A051437(n-3).

Programs

  • PARI
    \\ See A303732 for NCPathSetsModCyclic
    { my(rows=Vec(NCPathSetsModCyclic(vector(10, k, y))-1));
    for(n=1, #rows, for(k=1,n,print1(polcoeff(rows[n],k), ", ")); print;)}

A303866 Number of noncrossing path sets on 4*n nodes up to rotation with each path having exactly 4 nodes.

Original entry on oeis.org

1, 3, 36, 960, 35956, 1588192, 77381016, 4031052368, 220584971892, 12535415236272, 734006917110352, 44036846006084336, 2695712407044476920, 167837690527630068192, 10601944003900014217704, 678116169233319969588160, 43848248800067454244195956, 2862607888444933662236506240
Offset: 0

Views

Author

Andrew Howroyd, May 01 2018

Keywords

Crossrefs

Column 4 of A303864.
Showing 1-6 of 6 results.