Find the $n^{th}$ term of the sequence $\{a_n\}$ such that $\forall n \in \mathbb{N},\frac{a_1+a_2+\cdots+a_n}{n}=n+\frac{1}{n}$.

Here's my attempt.

Let $S_n=\sum_{i=1}^n a_i$. So, $S_{n+1}=\sum_{j=1}^{n+1} a_j$. Subtracting them will evantually give $a_{n+1}=2n+1=2(n+1)-1\implies a_n=2n-1$.

But the thing is if we put $n=3$, it will give LHS to be equal to $3$ but RHS to be $\frac{10}{3}$. Where am I wrong?


Solution 1:

You almost got it. Indeed, $a_n=2n-1$, but only when $n>1$. And $a_1=2$. So, the problem for the case $n=3$ vanishes.