Suppose a patient has to undergo, on the advice and prescription of an expert physician, three medical tests A, B and C (say a urine test, a blood test, and an X-ray, to be specific). The physician has imposed certain conditions on these tests:
(i) Tests B and C must be done only after test A is done.
(ii) Test A takes a full day; no other test can be carried out that day.
(iii) Each test can be completed on a single day; its implementation does not spill over to the next day.
(iv) Tests B and C can be carried out on the same day, or on separate days, in either order. When two tests are done together on a single day, we consider them to be a single test. The order in which the tests are performed is of no importance in this case.
(v) The tests must be completed within $n + 1$ days numbered $1, 2, 3,..., n + 1$.
The question now is: In how many different ways can tests A, B, C be performed?
My approach :
Let us consider $n=4$, so, number of days $=5$.
Case 1(B and C are being performed not on the same day):
So for this, clearly the ans is $\frac{^5P_5}{2!}-x$, where $x$ is the number of ways in which A is after B and C.
Case 2(B and C are on same day):
So, it's clerely $\frac{^5P_5}{3!}-y$, where $y$ is the number of ways in which A is after the single test (BC).
Am I correct? How to find $x$ and $y$? How to generalize this?
Let us just straightway jump into the general case, starting from the fact that we should first get test $A$ done.
For this we note that the test $A$ cannot be done on the $(n+1)^{\text{th}}$ day (why?). Let thus then safely assume that the test $A$ is done on the $k^{\text{th}}$ day.
Then, we can see that there are a total of $(n+1-k)$ possible days to take the tests $B$ and $C$. The total number of ways to do this are then $(n+1-k)^2$ (why?).
Thus, the total number of ways can be found by summing the value obtained before for $k=1$ to $n$ giving us: $$\sum_{k=1}^{n}(n+1-k)^2 = \,?$$