Evaluating the indefinite Harmonic number integral $\int \frac{1-t^n}{1-t} dt$ It is well-known that we can represent a Harmonic number as the following integral:
$$H_n = \int_0^1 \frac{1-t^n}{1-t} dt$$
The derivation of this integral doesn't need you to derive the indefinite integral  first, so now I'm wondering what the indefinite integral is and how one can derive it. According to WolframAlpha the indefinite integral is:
$$\int \frac{1-t^n}{1-t} dt = \frac{t^{n+1}{}_2F_1(1,n+1;n+2;t)}{n+1} - \ln(1-t) + C$$
where ${}_2F_1(a,b;c;z)$ is a Hypergeomtric function. I understand why $-\ln(1-t)$ is at the end, that's the result of splitting up the integrand, but I don't understand how a Hypergeometric function ends up there.

The integrand is (in the complex field) a meromorphic function, with one pole coinciding with one of the zeros, and therefore removable,
leaving a polynomial defined over the whole complex field. So it is its integral.
A) polynomial form
Let's define
$$
\eqalign{
  & I_{\,n} (x,a) = \int_{t\, = \,a}^{\;x} {{{1 - t^{\,n} } \over {1 - t}}dt}  =  - \int_{t\, = \,a}^{\;x} {{{1 - \left( {1 - u} \right)^{\,n} } \over u}du}  =   \cr 
  &  = \int_{u\, = \,1 - a}^{\;1 - x} {{{\left( {1 - u} \right)^{\,n}  - 1} \over u}du}  = \int_{u\, = \,0}^{\;1 - x} {{{\left( {1 - u} \right)^{\,n}  - 1} \over u}du}  - \int_{u\, = \,0}^{\;1 - a} {{{\left( {1 - u} \right)^{\,n}  - 1} \over u}du}  =   \cr 
  &  = J_{\,n} (1 - x) - J_{\,n} (1 - a) \cr} 
$$
so that the integration constant is inglobated in $a$.
Concerning $J_{\,n} (x) =$ we have
$$
\eqalign{
  & J_{\,n} (x) = \int_{u\, = \,0}^{\;x} {{{\left( {1 - u} \right)^{\,n}  - 1} \over u}du}  =   \cr 
  &  = \int_{u\, = \,0}^{\;x} {\sum\limits_{1\, \le \,k\, \le \,n} {\left( { - 1} \right)^{\,k} \left( \matrix{
  n \cr 
  k \cr}  \right)u^{\,k - 1} } du}  = \int_{u\, = \,0}^{\;x} {\sum\limits_{0\, \le \,k\,\left( { \le \,n - 1} \right)} {\left( { - 1} \right)^{\,k + 1} \left( \matrix{
  n \cr 
  k + 1 \cr}  \right)u^{\,k} } du}  =   \cr 
  &  = \sum\limits_{0\, \le \,k\,} {{{\left( { - 1} \right)^{\,k + 1} } \over {k + 1}}\left( \matrix{
  n \cr 
  k + 1 \cr}  \right)x^{\,k + 1} }  = x\sum\limits_{0\, \le \,k\,} {{{\left( { - 1} \right)^{\,k + 1} } \over {k + 1}}\left( \matrix{
  n \cr 
  k + 1 \cr}  \right)x^{\,k} }  \cr} 
$$
Indicating by $c_k$ the coefficient of $u^k$ we have
$$
\eqalign{
  & c_{\,k}  = {{\left( { - 1} \right)^{\,k + 1} } \over {k + 1}}\left( \matrix{
  n \cr 
  k + 1 \cr}  \right)\quad c_{\,0}  =  - n\quad   \cr 
  & {{c_{\,k + 1} } \over {c_{\,k} }} =  - {{n!} \over {\left( {k + 2} \right)\left( {k + 2} \right)!\left( {n - k - 2} \right)!}}{{\left( {k + 1} \right)\left( {k + 1} \right)!\left( {n - k - 1} \right)!} \over {n!}} =   \cr 
  &  = {{\left( {k + 1} \right)\left( {k - n + 1} \right)} \over {\left( {k + 2} \right)\left( {k + 2} \right)}} \cr} 
$$
and therefore we can put $J_{\,n} (x) $  into a hypergeometric form as
$$
J_{\,n} (x) =  - nx\sum\limits_{0\, \le \,k\,} {{{1^{\,\overline {\,k\,} } \left( { - n + 1} \right)^{\,\overline {\,k\,} } 1^{\,\overline {\,k\,} } } \over {2^{\,\overline {\,k\,} } 
  2^{\,\overline {\,k\,} } }}{{x^{\,k} } \over {k!}}}  =  - nx\;{}_3F_{\,2} \left( {\left. {\matrix{ {1,\;1,\; - \left( {n - 1} \right)}  \cr 
   {2,\;2}  \cr 
 } \,} \right|\;x} \right)
$$
which, having a negative upper term, is in fact a polynomial.
B) recursion
Splitting the binomial gives
$$
\eqalign{
  & J_{\,n} (x) = \sum\limits_{0\, \le \,k\,} {{{\left( { - 1} \right)^{\,k + 1} } \over {k + 1}}\left( \matrix{
  n \cr 
  k + 1 \cr}  \right)x^{\,k + 1} }  =   \cr 
  &  = \sum\limits_{0\, \le \,k\,} {{{\left( { - 1} \right)^{\,k + 1} } \over {k + 1}}\left( \matrix{
  n + 1 \cr 
  k + 1 \cr}  \right)x^{\,k + 1} }  - \sum\limits_{0\, \le \,k\,} {{{\left( { - 1} \right)^{\,k + 1} } \over {k + 1}}\left( \matrix{
  n \cr 
  k \cr}  \right)x^{\,k + 1} }  =   \cr 
  &  = J_{\,n + 1} (x) - \sum\limits_{0\, \le \,k\,} {{{\left( { - 1} \right)^{\,k + 1} n^{\,\underline {\,k\,} } } \over {\left( {k + 1} \right)k!}}x^{\,k + 1} }  =   \cr 
  &  = J_{\,n + 1} (x) - {1 \over {n + 1}}\sum\limits_{0\, \le \,k\,} {{{\left( { - 1} \right)^{\,k + 1} \left( {n + 1} \right)^{\,\underline {\,k + 1\,} } } \over {\left( {k + 1} \right)!}}x^{\,k + 1} }  =   \cr 
  &  = J_{\,n + 1} (x) - {1 \over {n + 1}}\sum\limits_{0\, \le \,k\,} {\left( { - 1} \right)^{\,k + 1} \left( \matrix{
  n + 1 \cr 
  k + 1 \cr}  \right)x^{\,k + 1} }  =   \cr 
  &  = J_{\,n + 1} (x) - {1 \over {n + 1}}\sum\limits_{1\, \le \,k\,} {\left( { - 1} \right)^{\,k} \left( \matrix{
  n + 1 \cr 
  k \cr}  \right)x^{\,k} }  =   \cr 
  &  = J_{\,n + 1} (x) - {1 \over {n + 1}}\left( {\sum\limits_{0\, \le \,k\,} {\left( { - 1} \right)^{\,k} \left( \matrix{
  n + 1 \cr 
  k \cr}  \right)x^{\,k} }  - 1} \right) =   \cr 
  &  = J_{\,n + 1} (x) - {1 \over {n + 1}}\left( {\left( {1 - x} \right)^{\,n + 1}  - 1} \right) \cr} 
$$
i.e.
$$
\eqalign{
  & J_{\,n + 1} (x) - J_{\,n} (x) = \int_{u\, = \,0}^{\;x} {{{\left( {1 - u} \right)^{\,n + 1}  - \left( {1 - u} \right)^{\,n} } \over u}du}  =   \cr 
  &  = \int_{u\, = \,0}^{\;x} {{{ - u\left( {1 - u} \right)^{\,n} } \over u}du}  = \int_{u\, = \,0}^{\;x} {\left( {1 - u} \right)^{\,n} d\left( {1 - u} \right)}  =   \cr 
  &  = {{\left( {1 - x} \right)^{\,n + 1}  - 1} \over {n + 1}} \cr} 
$$
and thus
$$ \bbox[lightyellow] {  
J_{\,n} (x) - J_{\,0} (x) = J_{\,n} (x) = \sum\limits_{k = 0}^{n - 1} {{{\left( {1 - x} \right)^{\,k + 1}  - 1} \over {k + 1}}} 
}$$
C) truncated logarithm
If we limit the range of $x$ in $(-1,1)$ then $ I_{\,n} (x,0)$ corresponds to the truncated expansion of $\ln{ \left( \frac{1}{1-x} \right)}$ .
So we may express it as
$$
\eqalign{
  & I_{\,n} (x,0) =   \cr 
  &  = \int_{t\, = \,0}^{\;x} {{{1 - t^{\,n} } \over {1 - t}}dt}  = \int_{t\, = \,0}^{\;x} {\sum\limits_{k = 0}^{n - 1} {t^{\,k} } dt}  = \sum\limits_{k = 0}^{n - 1} {{{x^{\,k + 1} } \over {k + 1}}}  =   \cr 
  & \quad \left| \matrix{
  \,\left| x \right| < 1 \hfill \cr 
  \;0 \le n \in Z \hfill \cr}  \right.\quad  =   \cr 
  &  =  - \ln \left( {1 - x} \right) - \int_{t\, = \,0}^{\;x} {{{t^{\,n} } \over {1 - t}}dt}  =   \cr 
  &  =  - \ln \left( {1 - x} \right) - \sum\limits_{k = n}^\infty  {{{x^{\,k + 1} } \over {k + 1}}}  =   \cr 
  &  =  - \ln \left( {1 - x} \right) - x^{\,n + 1} \sum\limits_{0\, \le \,k\,} {{{x^{\,k} } \over {\,k + n + 1}}}  =   \cr 
  &  =  - \ln \left( {1 - x} \right) - {{x^{\,n + 1} } \over {n + 1}}{}_2F_{\,1} \left( {\left. {\matrix{
   {n + 1,\;1}  \cr 
   {n + 2}  \cr 
 } \;} \right|\;z} \right) =   \cr 
  &  =  - \ln \left( {1 - x} \right) - x^{\,n + 1} \hat \Phi \left( {x,1,n + 1} \right) =   \cr 
  &  =  - \ln \left( {1 - x} \right) - x^{\,n + 1} \int_{t = 0}^\infty  {{{e^{\, - \left( {n + 1} \right)t} } \over {1 - xe^{\, - t} }}dt}  = \; \cdots  \cr} 
$$
where
$\hat \Phi $ denotes the Lerch transcendent.
Of course, many other manipulations and transformations may be applied.
However it is to underline that the connection with the logarithm may be deceptive, since the combination
with the hypergeometric, Lerch t., etc. finally shall return a polynomial.
