OFFSET
0,1
COMMENTS
For n>=3, a(n-3) is equal to the number of functions f:{1,2,...,n}->{1,2,3} such that for fixed, different x_1, x_2, x_3 in {1,2,...,n} and fixed y_1, y_2, y_3 in {1,2,3} we have f(x_i)<>y_i, (i=1,2,3). - Milan Janjic, May 13 2007
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..300
Milan Janjic, Enumerative Formulas for Some Functions on Finite Sets
Tanya Khovanova, Recursive Sequences
Index entries for linear recurrences with constant coefficients, signature (3).
FORMULA
a(n) = 3*a(n-1). G.f.: 8/(1-3*x). - Colin Barker, Jul 02 2012
From Elmo R. Oliveira, Aug 16 2024: (Start)
E.g.f.: 8*exp(3*x).
MATHEMATICA
8*3^Range[0, 60] (* Vladimir Joseph Stephan Orlovsky, Jun 09 2011 *)
PROG
(Magma) [8*3^n: n in [0..30]]; // Vincenzo Librandi, Jun 10 2011
(PARI) a(n)=8*3^n \\ Charles R Greathouse IV, Sep 28 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved