OFFSET
0,5
COMMENTS
a(n) is the number of ways to split [n] into 2 intervals and perform the following:
1) in the first interval choose one subinterval and in the remaining subintervals (if there are any left), perform one of 2 possible tasks;
2) in the second interval choose 2 subintervals and in the remaining subintervals (if there are any left), perform one of 3 possible tasks.
LINKS
Index entries for linear recurrences with constant coefficients, signature (13,-67,171,-216,108).
FORMULA
a(n) = 13*a(n-1) - 67*a(n-2) + 171*a(n-3) - 216*a(n-4) + 108*a(n-5), n >= 5, a(0)=a(1)=a(2)=0, a(3)=1, a(4)=13.
a(n) = Sum_{k=2..n-2} k*2^(k-1)*(n-k,2)*3^(n-k-2).
a(n) = 3^(n-1)*(n^2 - 11*n + 42)/2 - 2^n*(n + 7). - Stefano Spezia, Jan 23 2024
EXAMPLE
The following diagrams illustrate the 3311 cases for n = 7, where the bar separates intervals, x represents a chosen subinterval, and i represents i possible tasks that can be performed in the subinterval, i = 2,3.
Case, number of cases:
x 2 2 2 2 | x x, 80;
x 2 2 2 | x x 3, 288;
x 2 2 | x x 3 3, 648;
x 2 | x x 3 3 3, 1080;
x | x x 3 3 3 3, 1215.
MATHEMATICA
LinearRecurrence[{13, -67, 171, -216, 108}, {0, 0, 0, 1, 13}, 28] (* James C. McMahon, Feb 12 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Jan 22 2024
STATUS
approved