I have been breaking my head from morning, but I have not been able to understand how wolfram alpha obtained the relationship.

I have been breaking my head from morning, but I have not been able to understand how wolfram alpha obtained the relationship.

Copyright © 2021 JogjaFile Inc.
It's a general fact $$\sum\limits_{n=0}^N r^n=\frac{r^{N+1}-1}{r-1}$$
Try proving this by induction. Then just let $r=e^{4}$