%I #34 Jul 03 2023 20:01:46
%S 1,1,2,6,19,60,189,595,1873,5896,18560,58425,183916,578949,1822473,
%T 5736961,18059374,56849086,178955183,563332848,1773314929,5582216355,
%U 17572253481,55315679788,174128175064,548137914373,1725482812088
%N INVERT transform of [1, 0, 1, 3, 9, 27, 81, ...].
%C Same as A052544 except for beginning with an additional 1.
%C Number of permutations of length n>=0 avoiding the partially ordered pattern (POP) {1>2, 1>3, 4>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 second and third elements, and the fourth element is larger than the second element. - _Sergey Kitaev_, Dec 09 2020
%H Reinhard Zumkeller, <a href="/A204200/b204200.txt">Table of n, a(n) for n = 1..1000</a>
%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, -3, 1).
%F a(n) = 4*a(n-1) - 3*a(n-2) + a(n-3).
%F G.f.: -1 + 1 / (1 - x - x^3 / (1 - 3*x)) = x * (1 + x / (1 - x - x / (1 - x)^2)) = x * (1 - 3*x + x^2) / (1 - 4*x + 3*x^2 - x^3).
%F a(n + 2) = A052544(n). That is, A052544 is the same except for extra 1 term and origin.
%F a(n+1) = Sum_{k, 0<=k<=n} A204533(n,k). - _Philippe Deléham_, Jan 18 2012
%e x + x^2 + 2*x^3 + 6*x^4 + 19*x^5 + 60*x^6 + 189*x^7 + 595*x^8 + ...
%t LinearRecurrence[{4, -3, 1}, {1, 1, 2}, 29] (* or *)
%t Rest@ CoefficientList[Series[-1 + 1/(1 - x - x^3/(1 - 3 x)), {x, 0, 29}], x] (* _Michael De Vlieger_, May 06 2019 *)
%o (PARI) {a(n) = if( n<1, n = 1-n; polcoeff( (1 - x)^2 / (1 - 3*x + 4*x^2 - x^3) + x * O(x^n), n), polcoeff( x * (1 - 3*x + x^2) / (1 - 4*x + 3*x^2 - x^3) + x * O(x^n), n))}
%o (Haskell)
%o a204200 n = a204200_list !! (n-1)
%o a204200_list = 1 : 1 : 2 : zipWith (+) a204200_list (tail $ zipWith (-)
%o (map (* 4) (tail a204200_list)) (map (* 3) a204200_list))
%o -- _Reinhard Zumkeller_, Jan 16 2012
%Y Cf. A052544.
%K nonn
%O 1,3
%A _Michael Somos_, Jan 12 2012