<s>[INST] Is there a way to create a summation function for this? I have an algorithm that generates terms as follows:
$$\begin{align*}
\text{Term 1}: &2\times 3\times\left(\frac{1}{2}+\frac{1}{3}\right) + 4\\
\text{Term 2}: &2\times 3\times 4\times\left(\frac{1}{2}+\frac{1}{3}+\frac{1}{4}\right) + 3\times 5\\
\text{Term 3}: &2\times 3\times 4\times 5\times\left(\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\frac{1}{5}\right) + 3\times4\times 6\\
\text{Term 4}: &2\times 3\times 4\times 5\times 6\left(\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\frac{1}{5}+\frac{1}{6}\right) + 3\times4\times 5\times 7
\end{align*}$$
and so on.
The pattern in the first half is obvious; the pattern in the second half is a little trickier. It "splits" the last multiplier into (multiplier-1)*(multiplier+1) so 4 changes into 3*5 and then the 5 on that one changes into 4*6 and so on for the next term.
I am trying to find a clever way to say "sum terms 1-N" given this pattern
 [/INST] The last term is $$\frac{(n+3)!}{2\times (n+2)},$$ 
or
$$\frac{(n+1)!(n+3)}{2}$$
where $n$ is the number of the term you are in. 
So the $n$th term is:
$$\begin{align*}
t_n &= (n+2)!\left(\frac{1}{2}+\cdots+\frac{1}{n+2}\right) + \frac{(n+3)!}{2\times(n+2)}\\
&= (n+2)!\left(\frac{1}{2}+\cdots+\frac{1}{n+2}\right) + \frac{(n+1)!(n+3)}{2}.
\end{align*}$$
</s>