%I #33 May 07 2023 17:03:01
%S 0,6,22,75,204,460,906,1617,2680,4194,6270,9031,12612,17160,22834,
%T 29805,38256,48382,60390,74499,90940,109956,131802,156745,185064,
%U 217050,253006,293247,338100,387904,443010,503781,570592,643830,723894,811195,906156,1009212,1120810
%N a(n) = n^4/2-5*n^3/2+21*n-30.
%H Vincenzo Librandi, <a href="/A217530/b217530.txt">Table of n, a(n) for n = 2..1000</a>
%H W. Griffiths, R. Smith and D. Warren, <a href="http://www.mat.unisi.it/newsito/puma/public_html/22_2/griffiths_smith_warren.pdf">Almost avoiding pairs of permutations</a>, PU. M. A. Vol. 22 (2011), 129-139.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-10,10,-5,1).
%F G.f.: x^3*(11*x^3-25*x^2+8*x-6)/(x-1)^5. [_Colin Barker_, Oct 17 2012]
%F a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5). - _Wesley Ivan Hurt_, Nov 10 2014
%p A217530:=n->n^4/2-5*n^3/2+21*n-30: seq(A217530(n), n=2..50); # _Wesley Ivan Hurt_, Nov 10 2014
%t Table[n^4/2 - 5 n^3/2 + 21 n - 30, {n, 2, 40}] (* _Vincenzo Librandi_, Mar 11 2013 *)
%t LinearRecurrence[{5,-10,10,-5,1},{0,6,22,75,204},40] (* _Harvey P. Dale_, Dec 12 2018 *)
%o (Maxima) makelist(n^4/2-5*n^3/2+21*n-30, n, 2, 40); /* _Martin Ettl_, Oct 15 2012 */
%o (Magma) [n^4/2-5*n^3/2+21*n-30: n in [2..40]]; // _Vincenzo Librandi_, Mar 11 2013
%K nonn,easy
%O 2,2
%A _N. J. A. Sloane_, Oct 13 2012