Closed form of function $f(n) = \frac1n \sum\limits _{k=1}^{n-1} f(k)$? Could anyone help me get to the closed form of the function?  Here $\mathbb{N}=\{1,2,3,\ldots\}$.

Find all functions $f:\mathbb{N}\to\mathbb{R}$ such that $f(1)=1$ and
$$f(n) = \frac 1 n \sum _{k = 1}^{n-1}f(k)$$
for every integer $n>1$.

So far, I see that
$$f(2)=\frac{1}{2}f(1)=\frac12,$$
$$f(3)=\frac{1}{3}\left(f(1)+f(2)\right)=\frac{1}{3}\left(1+\frac{1}{2}\right)=\frac12,$$
$$f(4)=\frac14\left(f(1)+f(2)+f(3)\right)=\frac14\left(1+\frac12+\frac12\right)=\frac12.$$
I guess that $f(n)=\frac12$ for every $n\in\mathbb{N}$.  How to show this?
 A: Alternatively, if $n>2$ is an integer, then $$n\,f(n)=\sum_{i=1}^{n-1}\,f(i)=f(n-1)+\sum_{i=1}^{n-2}\,f(i)=f(n-1)+(n-1)\,f(n-1)=n\,f(n-1)$$ so that $f(n)=f(n-1)$.
Since $f(2)=\dfrac{1}{2}\,f(1)$, we conclude that (disregarding the condition that $f(1)=1$), all solutions $f:\mathbb{N}\to\mathbb{R}$ to the required functional equation is
$$f(n)=\left\{\begin{array}{ll}
c&\text{if }n=1\,,\\
\dfrac{c}{2}&\text{if }n=2,3,4,\ldots\,,
\end{array}\right.$$
where $c\in\mathbb{R}$ is arbitrary.  (For the specific function $f$ in question, $c=1$, since $f(1)=1$.)
A: Start by computing the first few terms to gain an intuition into the problem, we can see that $f(2) = \frac{1}{2} f(1) = \frac{1}{2}$. And then, it follows that $f(3) = \frac{1}{3} \left(1 + \frac{1}{2}\right) = \frac{1}{2} $, etc... 
Claim: $f(n) = \frac{1}{2}$ for all $n \geq 2$. 
Proof: Assume the above holds, then $$f(n+1) = \frac{1}{n+1} \left(f(1) + \cdots + f(n) \right) = \frac{1}{n+1}\left(1 + \frac{n-1}{2}\right) = \frac{1}{n+1} \cdot \frac{n+1}{2} = \frac{1}{2}$$
and by induction, we are done. 
A: If you compute the first several terms you get $1,\dfrac 1 2, \dfrac 1 2, \dfrac 1 2,\dfrac 1 2$, so the question is whether that continues.
$$
\underbrace{1,\frac 1 2, \frac 1 2, \frac 1 2,\frac 1 2}_{\text{5 terms, so } n\,=\,6}\,,  
$$
Adding up $4$ terms equal to $1/2$ and one term equal to $1$ yield the same sum as $6$ terms equal to $1/2$, so you're adding up $6$ instances of $1/2$ and then dividing by $6$, getting $1/2$.
The question is: Will that continue?
Taking it one more step, you have
$$
\underbrace{1,\frac 1 2, \frac 1 2, \frac 1 2,\frac 1 2,\frac 1 2}_{\text{6 terms, so } n\,=\,7}\,,  
$$
Adding up $5$ terms equal to $1/2$ and one term equal to $1$ yield the same sum as $7$ terms equal to $1/2$, so you're adding up $7$ instances of $1/2$ and then dividing by $7$, getting $1/2$.
Will this always continue for one more step after it's persisted for $n$ steps?
$$
\underbrace{1,\frac 1 2, \frac 1 2, \frac 1 2,\frac 1 2,\ldots\ldots,\frac 1 2}_{n-1\text{ terms}}\,,  
$$
Adding up $n-2$ terms equal to $1/2$ and one term equal to $1$ yield the same sum as $n+1$ terms equal to $1/2$, so you're adding up $n+1$ instances of $1/2$ and then dividing by $n+1$, getting $1/2$.
The paragraph above is the essence of mathematical induction.  That is how to prove the pattern persists.  When a sequence is defined by recursion, that suggests using mathematical induction to prove things about it (at least initially).
A: This is similar to the first answer, but without rewriting things. Note that
$$f(n+1) = \frac{1}{n+1}\sum_{x=1}^n f(x) = \frac{1}{n+1}\sum_{x=1}^{n-1}f(x) + \frac{1}{n+1}f(n).$$
Using the definition for $f(n)$, this becomes
$$f(n+1) = \frac{1}{n+1}\sum_{x=1}^{n-1} f(x) + \frac{1}{n(n+1)}\sum_{x=1}^{n-1}f(x) = \left(\frac{1}{n+1}+\frac{1}{n(n+1)}\right)\sum_{x=1}^{n-1}f(x).$$
By making a common denominator, we get that
$$\frac{1}{n+1}+\frac{1}{n(n+1)} = \frac{n}{n(n+1)}+\frac{1}{n(n+1)} = \frac{n+1}{n(n+1)} = \frac{1}{n},$$
thus
$$f(n+1) = \frac{1}{n}\sum_{x=1}^{n-1} f(x) = f(n).$$
A: $\newcommand{\angles}[1]{\left\langle\,{#1}\,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\Li}[1]{\,\mathrm{Li}_{#1}}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

Lets
  $\ds{\,\mathcal{F}\pars{z} \equiv
\sum_{n = 2}^{\infty}\,\mathrm{f}\pars{n}z^{n}}$ with $\ds{\verts{z} < 1}$.

\begin{align}
z\,\partiald{\,\mathcal{F}\pars{z}}{z} & =
\sum_{n = 2}^{\infty}n\,z^{n}\,\mathrm{f}\pars{n}=
\sum_{n = 2}^{\infty}z^{n}\sum _{x = 1}^{n - 1}\,\mathrm{f}\pars{x} =
\sum_{n = 1}^{\infty}z^{n + 1}\sum _{x = 1}^{n}\,\mathrm{f}\pars{x} =
\sum_{x = 1}^{\infty}\,\mathrm{f}\pars{x}\sum _{n = x}^{\infty}z^{n + 1}
\\[3mm] & =
\sum_{x = 1}^{\infty}\,\mathrm{f}\pars{x}{z^{x + 1} \over 1 - z} =
{z \over 1 - z}\sum_{n = 1}^{\infty}z^{n}\,\mathrm{f}\pars{n} =
{z \over 1 - z}\bracks{z\,\mathrm{f}\pars{1} +
\sum_{n = 2}^{\infty}z^{n}\,\mathrm{f}\pars{n}}
\\[3mm] & = {z^{2} \over 1 - z} + {z \over 1 - z}\,\mathcal{F}\pars{z}
\end{align}

$$
\imp\bracks{\pars{z - 1}\,\partiald{}{z} + 1}\,\mathcal{F}\pars{z} = -z
\quad\imp\quad
\partiald{}{z}\bracks{\pars{z - 1}\,\mathcal{F}\pars{z}} = -z\,,\quad\,
\mathcal{F}\pars{0} = 0
$$

$$
\imp\,\mathcal{F}\pars{z} = \half\,{z^{2} \over 1 - z}
$$

\begin{align}
\mathcal{F}\pars{z} & =
-\,\half\pars{{1 - z^{2} \over 1 - z} - {1 \over 1 - z}} =
-\half\pars{1 + z} + \half\sum_{n = 0}^{\infty}z^{n} =
\half\sum_{n = 2}^{\infty}z^{n}
\end{align}

\begin{align}
\mbox{Then,}\quad\,\mathcal{F}\pars{z} & =
\sum_{n = 2}^{\infty}\color{#f00}{\,\mathrm{f}\pars{n}}z^{n} =
\sum_{n = 2}^{\infty}\color{#f00}{\half}\,z^{n}
\quad\imp
\quad\fbox{$\ds{\
\color{#f00}{\,\mathrm{f}\pars{n}} = 
\color{#f00}{\half\,,\quad
\forall\ n \geq 2}\ }$}
\end{align}


Thanks to user @Batominovski who calls my attention to the condition
  $\ds{\,\mathcal{F}\pars{0} = 0}$.

