%I #12 Oct 20 2017 14:37:17
%S 1,2,5,12,25,48,87,152,259,434,719,1182,1933,3150,5121,8312,13477,
%T 21836,35363,57252,92671,149982,242715,392762,635545,1028378,1663997,
%U 2692452,4356529,7049064,11405679,18454832,29860603,48315530,78176231,126491862,204668197
%N Number of permutations of length n which avoid the patterns 321, 1342, 1423.
%H Colin Barker, <a href="/A116730/b116730.txt">Table of n, a(n) for n = 1..1000</a>
%H Lara Pudwell, <a href="http://faculty.valpo.edu/lpudwell/maple/webbook/bookmain.html">Systematic Studies in Pattern Avoidance</a>, 2005.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3, -2, -1, 1).
%F G.f.: x*(1 - x + x^2 + 2*x^3) / ((1 - x)^2*(1 - x - x^2)).
%F a(n) = 2*A000045(n+3)-3*n-2. - _R. J. Mathar_, Aug 05 2008
%F From _Colin Barker_, Oct 20 2017: (Start)
%F a(n) = 1 + (2^(1-n)*((1-sqrt(5))^n*(-2+sqrt(5)) + (1+sqrt(5))^n*(2+sqrt(5))))/sqrt(5) - 3*(1 + n).
%F a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4) for n>4.
%F (End)
%o (PARI) Vec(x*(1 - x + x^2 + 2*x^3) / ((1 - x)^2*(1 - x - x^2)) + O(x^40)) \\ _Colin Barker_, Oct 20 2017
%K nonn,easy
%O 1,2
%A _Lara Pudwell_, Feb 26 2006
%E Extended beyond a(30) by _R. J. Mathar_, Aug 05 2008