OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Guo-Niu Han, Enumeration of Standard Puzzles, 2011. [Cached copy]
Guo-Niu Han, Enumeration of Standard Puzzles, arXiv:2006.14070 [math.CO], 2020.
Index entries for linear recurrences with constant coefficients, signature (6,-9,4).
FORMULA
From Vincenzo Librandi, Jun 16 2013: (Start)
G.f.: (1 - 3*x + 5*x^2)/((1 - 4*x)*(1 - x)^2).
a(n) = 6*a(n-1) - 9*a(n-2) + 4*a(n-3). (End)
E.g.f.: exp(x)*(exp(3*x) - x). - Elmo R. Oliveira, Sep 10 2024
MATHEMATICA
Table[4^n - n, {n, 0, 30}] (* or *) CoefficientList[Series[(1 - 3 x + 5 x^2) / ((1 - 4 x) (1 - x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, Jun 16 2013 *)
PROG
(Magma) [4^n - n: n in [0..35]]; // Vincenzo Librandi, May 13 2011
(Magma) I:=[1, 3, 14]; [n le 3 select I[n] else 6*Self(n-1)-9*Self(n-2)+4*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 16 2013
(PARI) a(n)=4^n-n \\ Charles R Greathouse IV, Sep 24 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved