OFFSET
3,2
COMMENTS
Exactly 2 adjacent element pairs in decreasing order gives A027540(n-1).
LINKS
Andrew Howroyd, Table of n, a(n) for n = 3..500
Index entries for linear recurrences with constant coefficients, signature (16,-111,438,-1083,1740,-1817,1190,-444,72).
FORMULA
From Andrew Howroyd, May 05 2020: (Start)
a(n) = n*A000460(n-1).
a(n) = n*(3^(n-1) - n*2^(n-1) + n*(n-1)/2).
a(n) = 16*a(n-1) - 111*a(n-2) + 438*a(n-3) - 1083*a(n-4) + 1740*a(n-5) - 1817*a(n-6) + 1190*a(n-7) - 444*a(n-8) + 72*a(n-9).
G.f.: x^4*(4 - 9*x - 40*x^2 + 131*x^3 - 98*x^4)/((1 - x)^4*(1 - 2*x)^3*(1 - 3*x)^2).
(End)
PROG
(PARI) a(n)={n*(3^(n-1) - n*2^(n-1) + n*(n-1)/2)} \\ Andrew Howroyd, May 05 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. H. Hardin, May 21 2009
EXTENSIONS
Terms a(18) and beyond from Andrew Howroyd, May 05 2020
STATUS
approved