Finding general term of $\{x_n\}$ given $x_{m+n} = x_m + x_n + m\cdot n, \; \forall m, n \in \mathbb N$

algebra-precalculussequences-and-series

There exists a sequence $\{x_n\}$ members of which satisfy the following equation:

$$x_{m+n} = x_m + x_n + m\cdot n,\; \forall m, n \in \mathbb N, \; x_1 = a
$$
Find the general term of the sequence.

To solve this I started from the case when $m = n = 1$. That gives:

$$
x_2 = x_1 + x_1 + = 2x_1 +1
$$

I want to look at $x_3, x_4, …, x_n$ and find some pattern. So for $m = 1$ and $n = 2$ we obtain:

$$
x_3 = x_1 + x_2 + 2 = x_1 + 2x_1 + 1 = 3x_1 + 3
$$

Continuing that process we obtain:

$$
x_1 = \color{green}1x_1 + \color{blue}0 \\
x_2 = \color{green}2x_1 + \color{blue}1 \\
x_3 = \color{green}3x_1 + \color{blue}3 \\
x_4 = \color{green}4x_1 + \color{blue}8 \\
x_5 = \color{green}5x_1 + \color{blue}{10} \\
x_6 = \color{green}6x_1 + \color{blue}{15}
$$

And so on. The green values form a sequence of natural numbers. For the blue ones i referred to OEIS and the sequence is in the form ${1 \over 2} (n-1)$. Based on that the general term is:

$$
x_n = n(a + {1\over 2}(n-1))
$$

I've also looked at a similar sequence which satisfies the following:

$$
x_{m+n} = x_m + x_n + m + n,\; \forall m, n \in \mathbb N
$$

And again I was able to search for the sequence in OEIS but could not deduce it myself without a lookup. Also it is not going to always work since one may imagine sequences which match for the first $n$ terms and starting from $n+1$ become different.

My question is:

I'm interested whether there exists a common approach to find the generating function for a given sequence (of numbers). Or perhaps the problem above may be solved in a different way which would give the general term formula without "guessing" its form.

Best Answer

Let $f(n) = x_n$ then for $m=1$ we have $$f(n+1) = f(n)+n+a$$

Then by telescoping we get $$ f(n) = na+{n(n-1)\over 2}$$

Related Question