[go: up one dir, main page]

login
A342482
a(n) = n*(2^(n-1) - n - 1).
1
0, 12, 50, 150, 392, 952, 2214, 5010, 11132, 24420, 53066, 114478, 245520, 524016, 1113806, 2358954, 4980356, 10485340, 22019634, 46136838, 96468440, 201325992, 419429750, 872414530, 1811938572, 3758095572, 7784627354, 16106126430, 33285995552, 68719475680
OFFSET
3,2
COMMENTS
a(n) is the number of ternary strings of length n with at least one 0, at least two 1's, and one 2.
FORMULA
G.f.: 2*x^4*(6 - 17*x + 14*x^2 - 4*x^3)/((1 - x)^3*(1 - 2*x)^2). - Stefano Spezia, Mar 14 2021
EXAMPLE
a(6)=150 since the strings are the 30 permutations of 201111, the 60 permutations of 200111 and the 60 permutations of 200011.
MATHEMATICA
Array[# (2^(# - 1) - # - 1) &, 30, 3] (* Michael De Vlieger, Mar 13 2021 *)
CROSSREFS
Sequence in context: A248230 A083559 A051797 * A333276 A145886 A349860
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Mar 13 2021
STATUS
approved