OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..400
Franck Ramaharo, Statistics on some classes of knot shadows, arXiv:1802.07701 [math.CO], 2018.
Index entries for linear recurrences with constant coefficients, signature (6,-9).
FORMULA
a(n) = 4*(n-1)*3^(n-2).
G.f.: 4*z^2/(1-3*z)^2.
EXAMPLE
a(2)=4 because the ternary words 00,01,02,11,12 and 22 have no drops, each of the words 10 and 21 has one drop of length 1 and the word 20 has one drop of length 2.
MAPLE
seq(4*(n-1)*3^(n-2), n=1..27);
MATHEMATICA
Table[4*(n-1)*3^(n-2), {n, 30}] (* Wesley Ivan Hurt, Jan 28 2014 *)
LinearRecurrence[{6, -9}, {0, 4}, 30] (* Harvey P. Dale, Jul 14 2023 *)
PROG
(Magma) [4*(n-1)*3^(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 09 2011
(PARI) a(n) = 4*(n-1)*3^(n-2); \\ Altug Alkan, May 16 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Emeric Deutsch, Jul 15 2006
STATUS
approved