%I #68 May 27 2024 22:42:24
%S 1,2,5,12,31,82,223,616,1723,4862,13815,39468,113257,326198,942425,
%T 2730032,7926659,23061590,67214399,196211252,573590621,1678941350,
%U 4920076877,14433305000,42381641381,124558477682,366371703833
%N Partial sums of the central trinomial coefficients (A002426).
%C a(n) is the number of peaks at odd height in all Motzkin paths of length n+2. Example: a(2)=5 counts the peaks shown between parentheses in the 9 Motzkin paths of length 4: HHHH, HH(UD), H(UD)H, HUHD, (UD)HH, (UD)(UD), UHDH, UHHD and UUDD.
%C Binomial transform of 1,1,2,2,6,6,20,20,70,70...... (A000984 doubled). It would appear that the Hankel transform of this sequence is a signed version of A128055, with sign pattern given by s(n)=(2/3-sqrt(3)/3)cos(5*Pi*n/6)-sin(5*Pi*n/6)/3+(sqrt(3)/3+2/3)*cos(Pi*n/6)-sin(Pi*n/6)/3-cos(Pi*n/2)/3+sin(Pi*n/2)/3. - _Paul Barry_, Jan 03 2008
%C The subsequence of primes in this sequence of partial sums begins: 2, 5, 31, 223, 1723, no more through a(26). - _Jonathan Vos Post_, May 12 2010
%C Designate a triangle to have T(n,1) = T(n,n) = 1 and T(r,c) = T(r,c-1) + T(r-1,c-1) + T(r-2,c-1). The sum of the terms in row(n) = a(n+1). - _J. M. Bergot_, Apr 30 2013
%H Reinhard Zumkeller, <a href="/A097893/b097893.txt">Table of n, a(n) for n = 0..1000</a>
%H Moa Apagodu and Doron Zeilberger, <a href="http://arxiv.org/abs/1606.03351">Using the "Freshman's Dream" to Prove Combinatorial Congruences</a>, arXiv:1606.03351 [math.CO], 2016. Also Amer. Math. Monthly. 124 (2017), 597-608.
%H Paul Barry, <a href="http://dx.doi.org/10.1016/j.laa.2015.10.032">Riordan arrays, generalized Narayana triangles, and series reversion</a>, Linear Algebra and its Applications, 491 (2016) 343-385.
%H Karl Dilcher and Larry Ericksen, <a href="https://arxiv.org/abs/2405.12024">Polynomials and algebraic curves related to certain binary and b-ary overpartitions</a>, arXiv:2405.12024 [math.CO], 2024. See p. 14.
%H László Németh, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL21/Nemeth/nemeth6.html">The trinomial transform triangle</a>, J. Int. Seqs., Vol. 21 (2018), Article 18.7.3. Also <a href="https://arxiv.org/abs/1807.07109">arXiv:1807.07109</a> [math.NT], 2018.
%F G.f.: 1/((1-z)*sqrt(1-2*z-3*z^2)).
%F a(n) = Sum_{0<=j<=i<=n} C(i, i-j)*C(j, i-j). - _Benoit Cloitre_, Oct 23 2004
%F a(n) = sum_{k=0..n} Sum_{j=0..n-k} C(k,j)C(n-k,j)C(2j,j). - _Paul Barry_, Jan 03 2008
%F Logarithm g.f. atan(x*M(x)), M(x) - o.g.f. for Motzkin numbers (A001006). - Vladimir Kruchinin_, Aug 11 2010
%F Conjecture: -n*a(n) +(3*n-1)*a(n-1) +(n-2)*a(n-2) +3*(1-n)*a(n-3)=0. - _R. J. Mathar_, Nov 09 2012 [Since A002426(n) = a(n) - a(n-1), this third-order recurrence follows easily from the second-order recurrence given in A002426. - _Peter Bala_, Oct 28 2015]
%F G.f.: G(0)/(1-x), where G(k)= 1 + x*(2+3*x)*(4*k+1)/( 4*k+2 - x*(2+3*x)*(4*k+2)*(4*k+3)/(x*(2+3*x)*(4*k+3) + 4*(k+1)/G(k+1) )); (continued fraction). - _Sergei N. Gladkovskii_, Jun 29 2013
%F a(n) ~ 3^(n+3/2)/(4*sqrt(Pi*n)). - _Vaclav Kotesovec_, Oct 23 2013
%F a(n) = Sum_{k = 0..floor(n/2)} binomial(n + 1,2*k + 1) *binomial(2*k,k). Cf. A025178. - _Peter Bala_, Oct 28 2015
%F a(n) = (n+1)*hypergeom([1/2,(1-n)/2,-n/2],[1,3/2],4). - _Peter Luschny_, Oct 29 2015
%p ser:=series(1/(1-z)/sqrt(1-2*z-3*z^2),z=0,32): 1,seq(coeff(ser,z^n),n=1..31);
%p a := n -> (n+1)*hypergeom([1/2,(1-n)/2,-n/2],[1,3/2],4):
%p seq(simplify(a(n)), n=0..26); # _Peter Luschny_, Oct 29 2015
%t Table[ Sum[ Binomial[n, k]*Binomial[k, n-k], {k, 0, n}], {n, 0, 26}] // Accumulate (* _Jean-François Alcover_, Jul 10 2013 *)
%t CoefficientList[Series[1/((1-x)*Sqrt[1-2*x-3*x^2]), {x, 0, 50}], x] (* _G. C. Greubel_, Dec 21 2017 *)
%o (PARI) a(n)=sum(i=0,n,sum(j=0,i,binomial(i,i-j)*binomial(j,i-j)))
%o (Haskell)
%o a097893 n = a097893_list !! n
%o a097893_list = scanl1 (+) a002426_list
%o -- _Reinhard Zumkeller_, Jan 22 2013
%o (PARI) vector(30, n, n--; sum(k=0, n\2, binomial(n+1, 2*k+1)* binomial(2*k, k))) \\ _Altug Alkan_, Oct 29 2015
%o (PARI) x='x+O('x^30); Vec(1/((1-x)*sqrt(1-2*x-3*x^2))) \\ _G. C. Greubel_, Dec 21 2017
%Y Cf. A002426, A025178.
%K nonn,easy
%O 0,2
%A _Emeric Deutsch_, Sep 03 2004