OFFSET
0,3
COMMENTS
Number of ternary strings with at least one 0 or one 1 and at least one 2.
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,-11,6).
FORMULA
a(n) = 3^n - 2^n - 1, n>0; a(0)=0.
a(n) = 2*A053152(n).
EXAMPLE
The 4 strings for n=4 are 12, 21, 02, 20.
MATHEMATICA
LinearRecurrence[{6, -11, 6}, {0, 0, 4, 18}, 30] (* Paolo Xausa, Aug 07 2023 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Apr 16 2023
STATUS
approved