OFFSET
1,2
COMMENTS
This is essentially the p-INVERT of (1,1,1,1,1,...) for p(S) = (1 - 2 S); see A291000. - Clark Kimberling, Aug 24 2017
LINKS
FORMULA
a(n) = (4/27)*(n+1)*3^n for n >= 2.
G.f.: z*(1-z)^2/(1-3*z)^2.
a(n) = Sum_{k=0..ceiling(n/2)} k*A120924(n,k).
EXAMPLE
a(2) = 4 because in the 9 ternary words of length 2, namely 00, 01, 02, 10, 11, 12, 20, 21 and 22, we have altogether 4 isolated 0's.
MAPLE
1, seq(4*(n+1)*3^n/27, n=2..28);
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Jul 16 2006
STATUS
approved