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

A065097 a(n) = ((2n+1) + (2n-1) - 1)!/((2n+1)!*(2n-1)!).

Original entry on oeis.org

1, 1, 7, 66, 715, 8398, 104006, 1337220, 17678835, 238819350, 3282060210, 45741281820, 644952073662, 9183676536076, 131873975875180, 1907493251046152, 27767032438524099, 406472021074865382, 5979899192930226746, 88366931393503350700, 1311063521138246054410
Offset: 0

Views

Author

Len Smiley, Nov 11 2001

Keywords

Comments

A Catalan-like formula using consecutive odd numbers. Recall that Catalan numbers (A000108) are given by ((n+1)+(n)-1)!/((n+1)!(n)!).
From David Callan, Jun 01 2006: (Start)
a(n) = number of Dyck (2n)-paths (i.e., semilength = 2n) all of whose interior returns to ground level (if any) occur at or before the (2n-2)-nd step, that is, they occur strictly before the midpoint of the path.
For example, a(2)=7 counts UUUUDDDD, UUUDUDDD, UUDUUDDD, UUDUDUDD, UUUDDUDD, UD.UUUDDD, UD.UUDUDD ("." denotes an interior return to ground level).
This result follows immediately from an involution on Dyck paths, due to Emeric Deutsch, defined by E->E, UPDQ -> UQDP (where E is the empty Dyck path; U=upstep, D=downstep and P,Q are arbitrary Dyck paths), because the involution is fixed-point-free on Dyck (2n)-paths and contains one path of the type being counted in each orbit.
a(n) = Sum_{k=0..n-1} C(2n-1-2k)*C(2k). This identity has the following combinatorial interpretation:
a(n) is the number of odd-GL-marked Dyck (2n-1)-paths. An odd-GL vertex is a vertex at location (2i,0) for some odd i >= 1 (path starts at origin). An odd-GL-marked Dyck path is a Dyck path with one of its odd-GL vertices marked. For example, a(2)=7 counts UUUDDD*, UUDUDD*, UD*UUDD, UDUUDD*, UD*UDUD, UDUDUD*, UUDDUD* (the * denotes the marked odd-GL vertex). (End)
a(n+1) = Sum_{k=0..n} C(k)*C(2*n+1-k), n >= 0, with C(n) = A000108(n), also gives the odd part of the bisection of the half-convolution of the Catalan sequence A000108 with itself. For the definition of the half-convolution of a sequence with itself see a comment on A201204. There one also finds the rule for the o.g.f. given below in the formula section. The even part of this bisection is found under A201205. - Wolfdieter Lang, Jan 05 2012
From Peter Bala, Dec 01 2015: (Start)
Let x = p/q be a positive rational in reduced form with p,q > 0. Define Cat(x) = (1/(2*p + q))*binomial(2*p + q, p). Then Cat(n) = Catalan(n). This sequence is Cat(n + 1/2) = (1/(4*n + 4))*binomial(4*n + 4, 2*n + 1). Cf. A265101 (Cat(n + 1/3)), A265102 (Cat(n + 1/4)) and A265103 (Cat(n + 1/5)).
Number of maximal faces of the rational associahedron Ass(2*n + 1, 2*n + 3). Number of lattice paths from (0, 0) to (2*n + 3, 2*n + 1) using steps of the form (1, 0) and (0, 1) and staying above the line y = (2*n + 1)/(2*n + 3)*x. See Armstrong et al. (End)
Also the number of ordered rooted trees with 2n nodes, most of which are leaves, i.e., the odd bisection of A358585. This follows from Callan's formula below. - Gus Wiseman, Nov 27 2022

Examples

			G.f.: 1 + x + 7*x^2 + 66*x^3 + 715*x^4 + 8398*x^5 + 104006*x^6 + ...
		

Crossrefs

Cf. A003150 (for analog with consecutive Fibonacci numbers).

Programs

  • Magma
    [Binomial(4*n-1, 2*n-1)/(2*n+1): n in [1..20]]; // Vincenzo Librandi, Dec 09 2015
  • Maple
    seq(binomial(4*n-1,2*n-1)/(2*n+1), n=0..30); # Robert Israel, Dec 08 2015
  • Mathematica
    a[ n_] := If[ n < 1, 0, Binomial[ 4 n - 1, 2 n - 1] / (2 n + 1)]; (* Michael Somos, Oct 25 2014 *)
  • MuPAD
    combinat::dyckWords::count(2*n)/2 $ n = 1..26 // Zerinvary Lajos, Apr 25 2007
    
  • PARI
    a(n) = { if(n==0, 1, (4*n - 1)!/((2*n + 1)!*(2*n - 1)!)) } \\ Harry J. Smith, Oct 07 2009
    
  • PARI
    vector(20, n, binomial(4*n-1, 2*n-1)/(2*n+1)) \\ Altug Alkan, Dec 08 2015
    
  • Sage
    A065097 = lambda n: hypergeometric([1-2*n,-2*n],[2],1)/2
    [Integer(A065097(n).n(500)) for n in (1..20)] # Peter Luschny, Sep 22 2014
    

Formula

a(n) = binomial(4*n-1, 2*n-1)/(2*n+1).
a(n) = C(2n)/2 where C(n) is the Catalan number A000108. - David Callan, Jun 01 2006
G.f.: 1/2 + (sqrt(2)/2)/sqrt(1+sqrt(1-16*x)). - Vladeta Jovovic, Sep 26 2003
G.f.: 1 + 3F2([1, 5/4, 7/4], [2, 5/2], 16*x). - Olivier Gérard, Feb 16 2011
O.g.f.: (1 + (cata(sqrt(x)) + cata(-sqrt(x)))/2)/2, with the o.g.f. cata(x) of the Catalan numbers. See the W. Lang comment above. - Wolfdieter Lang, Jan 05 2012
a(n) = hypergeometric([1-2*n,-2*n],[2],1)/2. - Peter Luschny, Sep 22 2014
a(n) = A001448(n) / (4*n + 2) if n>0. - Michael Somos, Oct 25 2014
n*(2*n+1)*a(n) - 2*(4*n-1)*(4*n-3)*a(n-1) = 0. - R. J. Mathar, Oct 31 2015
O.g.f. is 1 + Revert( x*(1 + x)/(1 + 2*x)^4 ). - Peter Bala, Dec 01 2015
Sum_{n>=0} 1/a(n) = 39/25 + 4*Pi/(9*sqrt(3)) - 24*log(phi)/(25*sqrt(5)), where phi is the golden ratio (A001622). - Amiram Eldar, Mar 02 2023
From Peter Bala, Apr 29 2024: (Start)
For n >= 1, a(n) = (1/8)*Sum_{k = 0..2*n-1} (-1)^k * 4^(2*n-k)*binomial(2*n-1, k)*Catalan(k+1).
For n >= 1, a(n) = (1/8)*(16^n)*hypergeom([1 - 2*n, 3/2], [3], 1). (End)

Extensions

a(0)=1 prepended by Alois P. Heinz, Nov 28 2021

A358586 Number of ordered rooted trees with n nodes, at least half of which are leaves.

Original entry on oeis.org

1, 1, 1, 4, 7, 31, 66, 302, 715, 3313, 8398, 39095, 104006, 484706, 1337220, 6227730, 17678835, 82204045, 238819350, 1108202513, 3282060210, 15195242478, 45741281820, 211271435479, 644952073662, 2971835602526, 9183676536076, 42217430993002, 131873975875180, 604834233372884
Offset: 1

Views

Author

Gus Wiseman, Nov 24 2022

Keywords

Examples

			The a(1) = 1 through a(5) = 7 ordered trees:
  o  (o)  (oo)  (ooo)   (oooo)
                ((o)o)  ((o)oo)
                ((oo))  ((oo)o)
                (o(o))  ((ooo))
                        (o(o)o)
                        (o(oo))
                        (oo(o))
		

Crossrefs

For equality we have A000891, unordered A185650.
Odd-indexed terms appear to be A065097.
The unordered version is A358583.
The opposite is the same, unordered A358584.
The strict case is A358585, unordered A358581.
A000108 counts ordered rooted trees, unordered A000081.
A001263 counts ordered rooted trees by nodes and leaves, unordered A055277.
A080936 counts ordered rooted trees by nodes and height, unordered A034781.
A090181 counts ordered rooted trees by nodes and internals, unord. A358575.
A358590 counts square ordered trees, unordered A358589 (ranked by A358577).

Programs

  • Mathematica
    aot[n_]:=If[n==1,{{}},Join@@Table[Tuples[aot/@c],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[Select[aot[n],Count[#,{},{0,Infinity}]>=Count[#,[_],{0,Infinity}]&]],{n,1,10}]
  • PARI
    a(n) = if(n==1, 1, n--; (binomial(2*n,n)/(n+1) + if(n%2, binomial(n, (n-1)/2)^2 / n))/2) \\ Andrew Howroyd, Jan 13 2024

Formula

From Andrew Howroyd, Jan 13 2024: (Start)
a(n) = Sum_{k=1..floor(n/2)} A001263(n-1, k) for n >= 2.
a(2*n) = (A000108(2*n-1) + A000891(n-1))/2 for n >= 1;
a(2*n+1) = A000108(2*n)/2 for n >= 1. (End)

Extensions

a(16) onwards from Andrew Howroyd, Jan 13 2024

A358581 Number of rooted trees with n nodes, most of which are leaves.

Original entry on oeis.org

1, 0, 1, 1, 4, 5, 20, 28, 110, 169, 663, 1078, 4217, 7169, 27979, 49191, 191440, 345771, 1341974, 2477719, 9589567, 18034670, 69612556, 132984290, 511987473, 991391707, 3807503552, 7460270591, 28585315026, 56595367747, 216381073935, 432396092153
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2022

Keywords

Examples

			The a(1) = 1 through a(7) = 20 trees:
  o  .  (oo)  (ooo)  (oooo)   (ooooo)   (oooooo)
                     ((ooo))  ((oooo))  ((ooooo))
                     (o(oo))  (o(ooo))  (o(oooo))
                     (oo(o))  (oo(oo))  (oo(ooo))
                              (ooo(o))  (ooo(oo))
                                        (oooo(o))
                                        (((oooo)))
                                        ((o)(ooo))
                                        ((o(ooo)))
                                        ((oo)(oo))
                                        ((oo(oo)))
                                        ((ooo(o)))
                                        (o((ooo)))
                                        (o(o)(oo))
                                        (o(o(oo)))
                                        (o(oo(o)))
                                        (oo((oo)))
                                        (oo(o)(o))
                                        (oo(o(o)))
                                        (ooo((o)))
		

Crossrefs

For equality we have A185650 aerated, ranked by A358578.
The opposite version is A358582, non-strict A358584.
The non-strict version is A358583.
The ordered version is A358585, odd-indexed terms A065097.
A000081 counts rooted trees, ordered A000108.
A034781 counts rooted trees by nodes and height, ordered A080936.
A055277 counts rooted trees by nodes and leaves, ordered A001263.
A358575 counts rooted trees by nodes and internal nodes, ordered A090181.
A358589 counts square trees, ranked by A358577, ordered A358590.

Programs

  • Mathematica
    art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[Select[art[n],Count[#,{},{0,Infinity}]>Count[#,[_],{0,Infinity}]&]],{n,0,10}]
  • PARI
    \\ See A358584 for R(n).
    seq(n) = {my(A=R(n)); vector(n, n, my(u=Vecrev(A[n]/y)); vecsum(u[n\2+1..#u]))} \\ Andrew Howroyd, Dec 31 2022

Formula

A358581(n) + A358584(n) = A000081(n).
A358582(n) + A358583(n) = A000081(n).
a(n) = Sum_{k=floor(n/2)+1..n} A055277(n, k). - Andrew Howroyd, Dec 31 2022

Extensions

Terms a(19) and beyond from Andrew Howroyd, Dec 31 2022

A358584 Number of rooted trees with n nodes, at most half of which are leaves.

Original entry on oeis.org

0, 1, 1, 3, 5, 15, 28, 87, 176, 550, 1179, 3688, 8269, 25804, 59832, 186190, 443407, 1375388, 3346702, 10348509, 25632265, 79020511, 198670299, 610740694, 1555187172, 4768244803, 12276230777, 37546795678, 97601239282, 297831479850, 780790439063, 2377538260547
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2022

Keywords

Examples

			The a(2) = 1 through a(6) = 15 trees:
  (o)  ((o))  ((oo))   (((oo)))   (((ooo)))
              (o(o))   ((o)(o))   ((o)(oo))
              (((o)))  ((o(o)))   ((o(oo)))
                       (o((o)))   ((oo(o)))
                       ((((o))))  (o((oo)))
                                  (o(o)(o))
                                  (o(o(o)))
                                  (oo((o)))
                                  ((((oo))))
                                  (((o)(o)))
                                  (((o(o))))
                                  ((o)((o)))
                                  ((o((o))))
                                  (o(((o))))
                                  (((((o)))))
		

Crossrefs

For equality we have A185650 aerated, ranked by A358578.
The complement is A358581.
The strict case is A358582.
The opposite version is A358583.
A000081 counts rooted trees, ordered A000108.
A055277 counts rooted trees by nodes and leaves, ordered A001263.
A358575 counts rooted trees by nodes and internal nodes, ordered A090181.
A358589 counts square trees, ranked by A358577, ordered A358590.

Programs

  • Mathematica
    art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[Select[art[n],Count[#,{},{0,Infinity}]<=Count[#,[_],{0,Infinity}]&]],{n,0,10}]
  • PARI
    R(n) = {my(A = O(x)); for(j=1, n, A = x*(y - 1  + exp( sum(i=1, j, 1/i * subst( subst( A + O(x*x^(j\i)), x, x^i), y, y^i) ) ))); Vec(A)};
    seq(n) = {my(A=R(n)); vector(n, n, vecsum(Vecrev(A[n]/y)[1..n\2]))} \\ Andrew Howroyd, Dec 30 2022

Formula

A358581(n) + A358584(n) = A000081(n).
A358582(n) + A358583(n) = A000081(n).
a(n) = Sum_{k=1..floor(n/2)} A055277(n, k). - Andrew Howroyd, Dec 30 2022

Extensions

Terms a(19) and beyond from Andrew Howroyd, Dec 30 2022

A358582 Number of rooted trees with n nodes, most of which are not leaves.

Original entry on oeis.org

0, 0, 1, 1, 5, 7, 28, 48, 176, 336, 1179, 2420, 8269, 17855, 59832, 134289, 443407, 1025685, 3346702, 7933161, 25632265, 62000170, 198670299, 488801159, 1555187172, 3882403641, 12276230777, 31034921462, 97601239282, 249471619165, 780790439063, 2015194486878
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2022

Keywords

Examples

			The a(3) = 1 through a(6) = 7 trees:
  ((o))  (((o)))  (((oo)))   ((((oo))))
                  ((o)(o))   (((o)(o)))
                  ((o(o)))   (((o(o))))
                  (o((o)))   ((o)((o)))
                  ((((o))))  ((o((o))))
                             (o(((o))))
                             (((((o)))))
		

Crossrefs

For equality we have A185650 aerated, ranked by A358578.
The opposite version is A358581, non-strict A358583.
The non-strict version is A358584.
The ordered version is A358585, odd-indexed terms A065097.
A000081 counts rooted trees, ordered A000108.
A055277 counts rooted trees by nodes and leaves, ordered A001263.
A358575 counts rooted trees by nodes and internal nodes, ordered A090181.
A358589 counts square trees, ranked by A358577, ordered A358590.

Programs

  • Mathematica
    art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[Select[art[n],Count[#,{},{0,Infinity}][_],{0,Infinity}]&]],{n,0,10}]
  • PARI
    \\ See A358584 for R(n).
    seq(n) = {my(A=R(n)); vector(n, n, vecsum(Vecrev(A[n]/y)[1..(n-1)\2]))} \\ Andrew Howroyd, Dec 30 2022

Formula

A358581(n) + A358584(n) = A000081(n).
A358582(n) + A358583(n) = A000081(n).
a(n) = Sum_{k=1..floor((n-1)/2)} A055277(n, k). - Andrew Howroyd, Dec 30 2022

Extensions

Terms a(19) and beyond from Andrew Howroyd, Dec 30 2022

A358583 Number of rooted trees with n nodes, at least half of which are leaves.

Original entry on oeis.org

1, 1, 1, 3, 4, 13, 20, 67, 110, 383, 663, 2346, 4217, 15118, 27979, 101092, 191440, 695474, 1341974, 4893067, 9589567, 35055011, 69612556, 254923825, 511987473, 1877232869, 3807503552, 13972144807, 28585315026, 104955228432, 216381073935, 794739865822
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2022

Keywords

Examples

			The a(1) = 1 through a(6) = 13 trees:
  o  (o)  (oo)  (ooo)   (oooo)   (ooooo)
                ((oo))  ((ooo))  ((oooo))
                (o(o))  (o(oo))  (o(ooo))
                        (oo(o))  (oo(oo))
                                 (ooo(o))
                                 (((ooo)))
                                 ((o)(oo))
                                 ((o(oo)))
                                 ((oo(o)))
                                 (o((oo)))
                                 (o(o)(o))
                                 (o(o(o)))
                                 (oo((o)))
		

Crossrefs

For equality we have A185650 aerated, ranked by A358578.
The strict case is A358581.
The opposite version is A358584, strict A358582.
The ordered version is A358586, strict A358585.
A000081 counts rooted trees, ordered A000108.
A055277 counts rooted trees by nodes and leaves, ordered A001263.
A358575 counts rooted trees by nodes and internal nodes, ordered A090181.
A358589 counts square rooted trees, ranked by A358577, ordered A358590.

Programs

  • Mathematica
    art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[Select[art[n],Count[#,{},{0,Infinity}]>=Count[#,[_],{0,Infinity}]&]],{n,1,10}]
  • PARI
    \\ See A358584 for R(n).
    seq(n) = {my(A=R(n)); vector(n, n, my(u=Vecrev(A[n]/y)); vecsum(u[(n-1)\2+1..#u]))} \\ Andrew Howroyd, Dec 31 2022

Formula

A358581(n) + A358584(n) = A000081(n).
A358582(n) + A358583(n) = A000081(n).
a(n) = Sum_{k=floor((n-1)/2)+1..n} A055277(n, k). - Andrew Howroyd, Dec 31 2022

Extensions

Terms a(19) and beyond from Andrew Howroyd, Dec 31 2022

A358553 Number of internal (non-leaf) nodes in the n-th standard ordered rooted tree.

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 2, 1, 2, 3, 3, 2, 3, 2, 2, 1, 4, 2, 4, 3, 4, 3, 3, 2, 2, 3, 3, 2, 3, 2, 2, 1, 3, 4, 3, 2, 5, 4, 4, 3, 3, 4, 4, 3, 4, 3, 3, 2, 4, 2, 4, 3, 4, 3, 3, 2, 2, 3, 3, 2, 3, 2, 2, 1, 3, 3, 5, 4, 4, 3, 3, 2, 4, 5, 5, 4, 5, 4, 4, 3, 5, 3, 5, 4, 5, 4, 4
Offset: 1

Views

Author

Gus Wiseman, Nov 26 2022

Keywords

Comments

We define the n-th standard ordered rooted tree to be obtained by taking the (n-1)-th composition in standard order (graded reverse-lexicographic, A066099) as root and replacing each part with its own standard ordered rooted tree. This ranking is an ordered variation of Matula-Goebel numbers, giving a bijective correspondence between positive integers and unlabeled ordered rooted trees.

Examples

			The 89-th standard rooted tree is ((o)o(oo)), and it has 3 internal nodes, so a(89) = 3.
		

Crossrefs

This statistic is counted by A001263, unordered A358575 (reverse A055277).
The unordered version is A342507, firsts A358554.
Other statistics: A358371 (leaves), A358372 (nodes), A358379 (edge-height).
A000081 counts rooted trees, ordered A000108.

Programs

  • Mathematica
    stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]];
    srt[n_]:=If[n==1,{},srt/@stc[n-1]];
    Table[Count[srt[n],[_],{0,Infinity}],{n,100}]

A358728 Number of n-node rooted trees whose node-height is less than their number of leaves.

Original entry on oeis.org

0, 0, 0, 1, 1, 5, 10, 30, 76, 219, 582, 1662, 4614, 13080, 36903, 105098, 298689, 852734, 2434660, 6964349, 19931147, 57100177, 163647811, 469290004, 1346225668, 3863239150, 11089085961, 31838349956, 91430943515, 262615909503, 754439588007, 2167711283560
Offset: 1

Views

Author

Gus Wiseman, Nov 29 2022

Keywords

Comments

Node-height is the number of nodes in the longest path from root to leaf.

Examples

			The a(1) = 0 through a(7) = 10 trees:
  .  .  .  (ooo)  (oooo)  (ooooo)   (oooooo)
                          ((oooo))  ((ooooo))
                          (o(ooo))  (o(oooo))
                          (oo(oo))  (oo(ooo))
                          (ooo(o))  (ooo(oo))
                                    (oooo(o))
                                    ((o)(ooo))
                                    ((oo)(oo))
                                    (o(o)(oo))
                                    (oo(o)(o))
		

Crossrefs

These trees are ranked by A358727.
For internals instead of node-height we have A358581, ordered A358585.
The case of equality is A358589 (square trees), ranked by A358577.
A000081 counts rooted trees, ordered A000108.
A034781 counts rooted trees by nodes and height, ordered A080936.
A055277 counts rooted trees by nodes and leaves, ordered A001263.

Programs

  • Mathematica
    art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[Select[art[n],Depth[#]-1
    				
  • PARI
    \\ Needs R(n,f) defined in A358589.
    seq(n) = {Vec(R(n, (h,p)->sum(j=h+1, n-1, polcoef(p,j,y))), -n)} \\ Andrew Howroyd, Jan 01 2023

Extensions

Terms a(19) and beyond from Andrew Howroyd, Jan 01 2023
Showing 1-8 of 8 results.