OFFSET
2,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 2..1000
W. Griffiths, R. Smith and D. Warren, Almost avoiding pairs of permutations, PU. M. A. Vol. 22 (2011), 129-139.
Index entries for linear recurrences with constant coefficients, signature (6,-12,8).
FORMULA
a(n) = 6*a(n-1)-12*a(n-2)+8*a(n-3). G.f.: -2*x^2*(6*x^2-3*x+1)/(2*x-1)^3. [Colin Barker, Oct 17 2012]
MATHEMATICA
Table[2^(n-2) (n-2)^2 + 2^(n-1), {n, 2, 30}] (* Vincenzo Librandi, Mar 11 2013 *)
PROG
(Maxima) makelist(2^(n-2)*(n-2)^2+2^(n-1), n, 2, 30); /* Martin Ettl, Oct 15 2012 */
(Magma) [2^(n-2)*(n-2)^2+2^(n-1): n in [2..30]]; // Vincenzo Librandi, Mar 11 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Oct 13 2012
STATUS
approved