%I #17 Dec 08 2020 19:02:08
%S 1,2,6,18,50,134,358,962,2594,6998,18870,50866,137106,369574,996230,
%T 2685474,7239042,19513718,52601558,141793810,382222322,1030326470,
%U 2777369510,7486734978,20181398242,54401396118,146645533174,395300745074,1065580898898,2872402002918,7742906497478,20871939570914
%N Expansion of ( 1-2*x+3*x^2 ) / ( 1-4*x+5*x^2-4*x^3 ).
%C Sum of all second elements at level n of the TRIP-Stern sequence corresponding to the permutation triple (e,e,e)
%C Number of permutations of length n>0 avoiding the partially ordered pattern (POP) {1>4, 3>2} of length 4. That is, number of length n permutations having no subsequences of length 4 in which the first element is larger than the last element, and the third element is larger than the second one. - _Sergey Kitaev_, Dec 08 2020
%H Harvey P. Dale, <a href="/A271897/b271897.txt">Table of n, a(n) for n = 0..1000</a>
%H Ilya Amburg, Krishna Dasaratha, Laure Flapan, Thomas Garrity, Chansoo Lee, Cornelia Mihaila, Nicholas Neumann-Chun, Sarah Peluse, Matthew Stoffregen, <a href="http://arxiv.org/abs/1509.05239">Stern Sequences for a Family of Multidimensional Continued Fractions: TRIP-Stern Sequences</a>, arXiv:1509.05239 [math.CO], 2015, Section 7.2.1.
%H Alice L. L. Gao, Sergey Kitaev, <a href="https://arxiv.org/abs/1903.08946">On partially ordered patterns of length 4 and 5 in permutations</a>, arXiv:1903.08946 [math.CO], 2019.
%H Alice L. L. Gao, Sergey Kitaev, <a href="https://doi.org/10.37236/8605">On partially ordered patterns of length 4 and 5 in permutations</a>, The Electronic Journal of Combinatorics 26(3) (2019), P3.26.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,-5,4).
%t CoefficientList[Series[(1-2x+3x^2)/(1-4x+5x^2-4x^3),{x,0,40}],x] (* or *) LinearRecurrence[{4,-5,4},{1,2,6},40] (* _Harvey P. Dale_, Dec 27 2016 *)
%o (PARI) x='x+O('x^99); Vec((1-2*x+3*x^2)/(1-4*x+5*x^2-4*x^3)) \\ _Altug Alkan_, Apr 16 2016
%Y Cf. A000930 (maximum at level n).
%K nonn,easy
%O 0,2
%A _R. J. Mathar_, Apr 16 2016