login
A396322
Expansion of e.g.f. exp(x)*(cosh(x)-1)*(sinh(x)-x).
0
0, 0, 0, 0, 0, 10, 60, 266, 1008, 3522, 11700, 37642, 118536, 367874, 1130220, 3447978, 10466784, 31662466, 95544420, 287812874, 865928952, 2603029698, 7820099100, 23483365930, 70498332240, 211595659970, 634996695060, 1905426292746, 5717184847848, 17153433591682, 51464193089100
OFFSET
0,6
COMMENTS
Number of ternary sequences of length n with a positive even number of 0's, an odd number >= 3 of ones and no restriction on the number of 2's.
FORMULA
a(n) = (3^n - (-1)^n)/4 - (n + 2)*2^(n-2) + n for n >= 2.
G.f.: 2*x^5*(5 - 10*x + 3*x^2)/((1 - 3*x + 2*x^2)^2*(1 - 2*x - 3*x^2)). - Stefano Spezia, May 24 2026
EXAMPLE
For n=7, the 266 strings are the 35 permutations of 0000111, the 21 permutations of 0011111 and the 210 permutations of 001122.
MATHEMATICA
LinearRecurrence[{8, -22, 20, 11, -28, 12}, {0, 0, 0, 0, 0, 10, 60, 266}, 31] (* Amiram Eldar, May 23 2026 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, May 21 2026
STATUS
approved