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.
%I A126223 #37 Jul 21 2017 13:36:10 %S A126223 0,1,2,7,26,98,372,1419,5434,20878,80444,310726,1202852,4665412, %T A126223 18126760,70538355,274877370,1072515990,4189573740,16383007410, %U A126223 64126407180,251226790620,985033185240,3865138313790,15176957307876,59633260964748,234453859803352 %N A126223 Number of level steps in all 2-Motzkin paths (i.e., Motzkin paths with blue and red level steps) of length n, without red level steps on the x-axis. %C A126223 a(n) is the number of increasing strict binary trees with 2n-1 nodes that avoid 213 and 321 in the classical sense. For more information about increasing strict binary trees with an associated permutation, see A245894. - _Manda Riehl_, Aug 07 2014 %H A126223 Alois P. Heinz, <a href="/A126223/b126223.txt">Table of n, a(n) for n = 0..1000</a> %F A126223 a(n) = Sum_{k=0..n} k*A126222(n,k). %F A126223 G.f.: (1-2z)(1-2z-sqrt(1-4*z))/(2z*sqrt(1-4z)). %F A126223 a(n) = 2*(2*n-3)*(n^2-n+1)*a(n-1)/((n+1)*(n^2-3*n+3)) for n>1. - _Alois P. Heinz_, May 20 2014 %F A126223 a(n) = 2*(1-n+n^2) * C(2*n-2, n-1) / (n*(n+1)). - _Vaclav Kotesovec_, Sep 08 2014 %e A126223 a(3) = 7 because the 2-Motzkin paths without red level steps on the x-axis are BBB, BUD, UBD, URD and UDB, where U=(1,1), D=(1,-1), B=blue (1,0), R=red (1,0); they have a total of 3+1+1+1+1 = 7 level steps. %p A126223 G:=(1-2*z)*(1-2*z-sqrt(1-4*z))/2/z/sqrt(1-4*z): Gser:=series(G,z=0,32): seq(coeff(Gser,z,n),n=0..28); %p A126223 # second Maple program: %p A126223 a:= proc(n) option remember; `if`(n<2, n, %p A126223 2*(2*n-3)*(n^2-n+1)*a(n-1)/((n+1)*(n^2-3*n+3))) %p A126223 end: %p A126223 seq(a(n), n=0..30); # _Alois P. Heinz_, May 20 2014 %t A126223 CoefficientList[Series[(1-2*x)*(1-2*x-Sqrt[1-4*x])/(2*x*Sqrt[1-4*x]), {x, 0, 20}], x] (* _Vaclav Kotesovec_, Sep 08 2014 *) %t A126223 Flatten[{0, Table[2*(1-n+n^2) * Binomial[2*n-2, n-1]/(n*(n+1)), {n, 1, 25}]}] (* _Vaclav Kotesovec_, Sep 08 2014 *) %Y A126223 Cf. A126222. %K A126223 nonn %O A126223 0,3 %A A126223 _Emeric Deutsch_, Dec 28 2006