sequence such that $x_{n+1}=n(x_n-n)$ Let $(x_n)$ be a sequence such that $x_{n+1}=n(x_n-n)$
Prove that $x_n=O(n)$ if and only if $x_1=2e$
If we have $x_n=O(n)$ then clearly $x_n=n+O(1)$ so they are equivalent.
I don't get how $x_1$ relates to this. Well it's a recurrent series but it's not of the form $x_{n+1}=f(x_n)$
 A: By some experimentation from the starting point $x_n=an+b+y_n$ and reporting in the equation I quickly found that $x_n=n+1+2y_n$ lead to the following simplification
$$y_{n+1}=ny_n-1$$
So we have transformed the $-n^2$ term into a constant $-1$ which is better.
Now we can set $y_n=(n-1)!\,z_n$ so as to make $n!$ appear on both sides of the equation.
$$z_{n+1}-z_n=\frac {-1}{n!}$$
This is a telescoping relation therefore $z_n=z_1-\sum\limits_{k=1}^{n-1}\frac 1{k!}$
We have $z_n\to z_1+(1-e)$ so to have $x_n=O(n)$ we need to cancel this with $z_1=e-1$
Which is equivalent to

$x_1=2+2y_1=2+2z_1=2+2(e-1)=2e$

A: Your question is about a sequence that satisfies
$$ x_{n+1} = n(x_n-n) \tag{1} $$
where initial value $\,x_1\,$ is given. This is a
linear recursion so that
$$ x_{n+1} = n!\,x_1-a_n \tag{2} $$
where $\,a_n\,$ does not depend on $\,x_1.\,$ A
quick search of OEIS finds that $\,a_n\,$ is the
OEIS sequence A030297.
The sequence entry give the formula
$$ a_n = \lfloor 2\,e\,n!-n-2\rfloor \tag{3} $$
for $\,n>1.\,$ This leads to the approximate result
$$ x_{n+1} = n!(x_1- 2\,e)+n+2 +O(1). \tag{4} $$
This implies that unless $\,x_1 = 2\,e\,$ then the
$\,n!\,$ term dominates.
Not needed here, but a more precise asymptotic
series for $\,a_n\,$ is
$$ a_n = 2\,e\,n! - b_{n+1} \tag{5} $$
where
$$ b_n \approx
n + 1 + \frac2n + \frac2{n^2}\sum_{k=0}^\infty
 \frac{c_n}{n^k} \tag{6} $$ and where $\,c_k\,$ is the
OEIS sequence A014182.
