%I #17 Jun 15 2020 07:15:33
%S 1,2,5,14,41,119,336,924,2492,6636,17536,46137,121095,317434,831571,
%T 2177734,5702191,14929519,39087182,102332996,267912946,701407172,
%U 1836310110,4807524929,12586266701,32951277474,86267568321,225851430414,591286726197,1548008751831
%N Number of permutations of length n which avoid the patterns 123, 51432.
%H Colin Barker, <a href="/A116847/b116847.txt">Table of n, a(n) for n = 1..1000</a>
%H Myrto Kallipoliti, Robin Sulzgruber, and Eleni Tzanaki, <a href="https://arxiv.org/abs/2006.06949">Patterns in Shi tableaux and Dyck paths</a>, arXiv:2006.06949 [math.CO], 2020.
%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_06">Index entries for linear recurrences with constant coefficients</a>, signature (7,-19,26,-19,7,-1)
%F G.f.: x*(1 - 5*x + 10*x^2 - 9*x^3 + 5*x^4 - x^5) / ((1 - x)^4*(1 - 3*x + x^2)).
%F a(n) = A001906(n) - A004006(n-1). - _R. J. Mathar_, Jan 12 2013
%F a(n) = 1 - ((3-sqrt(5))/2)^n/sqrt(5) + ((3+sqrt(5))/2)^n/sqrt(5) - (4*n)/3 + n^2/2 - n^3/6. - _Colin Barker_, Oct 31 2017
%o (PARI) Vec(x*(1 - 5*x + 10*x^2 - 9*x^3 + 5*x^4 - x^5) / ((1 - x)^4*(1 - 3*x + x^2)) + O(x^40)) \\ _Colin Barker_, Oct 31 2017
%K nonn,easy
%O 1,2
%A _Lara Pudwell_, Feb 26 2006