login
Alternating sum of Motzkin numbers A001006.
9

%I #81 Nov 16 2022 08:53:55

%S 1,0,2,2,7,14,37,90,233,602,1586,4212,11299,30536,83098,227474,625993,

%T 1730786,4805596,13393688,37458331,105089228,295673995,834086420,

%U 2358641377,6684761124,18985057352,54022715450,154000562759,439742222070,1257643249141

%N Alternating sum of Motzkin numbers A001006.

%C Diagonal sums of A089942.

%C Hankel transform is A187307.

%C Also gives the number of simple permutations of each length that avoid the pattern 321 (i.e., are the union of two increasing sequences, and in one line notation contain no nontrivial block of values which form an interval). There are 2 such permutations of length 4, 2 of length 5, etc. - _Michael Albert_, Jun 20 2012

%C Convolution of A005043 with itself. - _Philippe Deléham_, Jan 28 2014

%C From _Gus Wiseman_, Nov 15 2022: (Start)

%C Conjecture: Also the number of topologically series-reduced ordered rooted trees with n + 2 vertices. This would imply a(n) = A284778(n-1) + A005043(n). For example, the a(0) = 1 through a(5) = 14 trees are:

%C (o) . (ooo) (oooo) (ooooo) (oooooo)

%C ((oo)) ((ooo)) ((oo)oo) ((oo)ooo)

%C ((oooo)) ((ooo)oo)

%C (o(oo)o) ((ooooo))

%C (oo(oo)) (o(oo)oo)

%C (((oo)o)) (o(ooo)o)

%C ((o(oo))) (oo(oo)o)

%C (oo(ooo))

%C (ooo(oo))

%C (((oo)oo))

%C (((ooo)o))

%C ((o(oo)o))

%C ((o(ooo)))

%C ((oo(oo)))

%C (End)

%H Vincenzo Librandi, <a href="/A187306/b187306.txt">Table of n, a(n) for n = 0..300</a>

%H M. H. Albert and V. Vatter, <a href="http://arxiv.org/abs/1301.3122">Generating and enumerating 321-avoiding and skew-merged simple permutations</a>, arXiv preprint arXiv:1301.3122 [math.CO], 2013. - _N. J. A. Sloane_, Feb 11 2013

%H Paul Barry, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Barry/barry321.html">Jacobsthal Decompositions of Pascal's Triangle, Ternary Trees, and Alternating Sign Matrices</a>, Journal of Integer Sequences, 19, 2016, #16.3.5.

%H Cheyne Homberger, <a href="http://arxiv.org/abs/1410.2657">Patterns in Permutations and Involutions: A Structural and Enumerative Approach</a>, arXiv preprint 1410.2657 [math.CO], 2014.

%F G.f.: (1-x-sqrt(1-2*x-3*x^2))/(2*x^2*(1+x)).

%F a(n) = sum(k=0..n, A001006(k)*(-1)^(n-k)).

%F D-finite with recurrence -(n+2)*a(n) +(n-1)*a(n-1) +(5*n-2)*a(n-2) +3*(n-1)a(n-3)=0. - _R. J. Mathar_, Nov 17 2011

%F a(n) = (2*sum(j=0..n, C(2*j+1,j+1)*(-1)^(n-j)*C(n+2,j+2)))/(n+2). - _Vladimir Kruchinin_, Feb 06 2013

%F a(n) ~ 3^(n+5/2)/(8*sqrt(Pi)*n^(3/2)). - _Vaclav Kotesovec_, Aug 15 2013

%F a(n) = (-1)^n*(1-hypergeom([1/2,-n-1],[2],4)). - _Peter Luschny_, Sep 25 2014

%F a(n) = A005043(n+1) + (-1)^n. - _Peter Luschny_, Sep 25 2014

%F G.f.: (1/(1 - x^2/(1 - x - x^2/(1 - x - x^2/(1 - x - x^2/(1 - ...))))))^2, a continued fraction. - _Ilya Gutkovskiy_, Sep 23 2017

%p a := n -> (-1)^n*(1-hypergeom([1/2,-n-1],[2],4));

%p seq(round(evalf(a(n),99)),n=0..30); # _Peter Luschny_, Sep 25 2014

%t CoefficientList[Series[(1-x-Sqrt[1-2x-3x^2])/(2x^2(1+x)), {x,0,30}], x] (* _Harvey P. Dale_, Jun 14 2011 *)

%o (PARI) x='x+O('x^66); Vec((1-x-sqrt(1-2*x-3*x^2))/(2*x^2*(1+x))) /* _Joerg Arndt_, Mar 07 2013 */

%o (PARI) Vec(serreverse(x*(1-x)/(1-x+x^2) + O(x^30))^2) \\ _Andrew Howroyd_, Apr 28 2018

%o (Sage)

%o def A187306():

%o a, b, n = 1, 0, 1

%o yield a

%o while True:

%o n += 1

%o a, b = b, (2*b+3*a)*(n-1)/(n+1)

%o yield b - (-1)^n

%o A187306_list = A187306()

%o [next(A187306_list) for i in range(20)] # _Peter Luschny_, Sep 25 2014

%Y Cf. A001006, A005043, A089942.

%K nonn,easy

%O 0,3

%A _Paul Barry_, Mar 08 2011