Wolfram Alpha provides the following exact solution $$ \sum_{i=1}^N (1+k)^i = \frac{(1+k)\,((1+k)^N-1)}{k}.$$ I wish to solve for $N$ of the order of several thousand and $|k|$ very small (c. $10^{-12}).$ When I do this on a computer in excel the software cannot handle it (because of truncation of significant figures) and the results are nonsense.
I thought to approximate the result using the first few terms of a series in increasing powers of $k$. I can multiply out the first few terms and examine the patterns in the following pyramid... $$(1+k)^1 = k +1 $$ $$(1+k)^2 = k^2 +2k +1 $$ $$(1+k)^3 = k^3 +3k^2 +3k +1 $$ $$(1+k)^4 =k^4+4 k^3+6 k^2+4 k+1$$ $$(1+k)^5 =k^5+5 k^4+10 k^3+10 k^2+5 k+1$$ $$(1+k)^6 =k^6+6 k^5+15 k^4+20 k^3+15 k^2+6 k+1$$
So for example, for $N=3$ we would obtain the sum $$ S= k^3 +4k^2 +6k +1 $$
The results suggest a solution with a pattern of the form $$ S = a + bk^1 +ck^2+dk^3... $$
I can see that $a=N$. The other coefficients increase monotonously and it might be possible to determine a formula for the coefficients from the pattern. Although the general pattern is not convergent, it is possible that for certain restricted ranges of $N$ and $k$ a convergent formula could be obtained. If so then it is possible that a useful approximation of S can be obtained just by evaluating the first few terms in the series.
But is there a well-known general formula for the terms in this series or can one be derived algebraically from the original formula?
UPDATE
following on from the answer by User73985...
$$ S=\sum_{i=1}^N (1+k)^i = N + \sum_{j=2}^{N+1}\binom{N+1}{j}k^{j-1}$$ So $$ S= N + \sum_{j=2}^{N+1}\frac{(N+1)!}{(N+1-j)!j!}k^{j-1}$$
then $$ S= N + \frac{(N+1)!}{(N-1)!2!} k^{1} + \frac{(N+1)!}{(N-2)!3!} k^{2} + \frac{(N+1)!}{(N-3)!4!} k^{3} +... $$
giving $$ S= N + \frac{(N+1)(N)}{2!} k^{1} + \frac{(N+1)(N)(N-1)}{3!} k^{2} + \frac{(N+1)(N)(N-1)(N-2)}{4!} k^{3} +... $$
thus $$ S= N + \frac{N^2+N}{2} k^{1} + \frac{N^3-N}{6} k^{2} + \frac{N^4-2 N^3-N^2+2 N}{24} k^{3} +... $$
For $N=1 to 10,000$ and $k= 2.40242 * 10^{-12}$ this formula can be truncated to $$ S = N + \frac{N^2+N}{2} k^{1} $$ and then gives results very close to those expected. Because $k$ is so small relative to $n$ the terms in higher powers of $k$ can be ignored. Note that the coefficient of $k^1$ is consistent with that found by examination of the coefficients in the "pyramid" presented above.
Using $$ \sum_1^N (1+k)^i = \frac{(k+1)\,((k+1)^N-1)}{k}$$
(which since this is a geometric series is not hard to prove) we get
$$ \sum_1^N (1+k)^i = \frac{\left(\sum_{j=0}^{N+1}\binom{N+1}{j}k^j\right) - (k+1)}{k}$$
$$ = \frac{1 + (N+1)k + \left(\sum_{j=2}^{N+1}\binom{N+1}{j}k^j\right) - (k+1)}{k}$$
$$ = N + \sum_{j=2}^{N+1}\binom{N+1}{j}k^{j-1}$$