How to work with negative summations? I was playing with some equations earlier and I found that I could iterate one into itself and it did some cool things.
In these equations I knew this: $W_{n+1} = 1$
Then I found: $W_{n+2} = 3 + 2^{P_n}$
Then this: $W_{n+3} = 3^2 + 3^1 2^{P_n} + 3^0 2^{P_n + P_{n+1}}$
Then this: $W_{n+4} = 3^3 + 3^2 2^{P_n} + 3^1 2^{P_n + P_{n+1}} + 3^0 2^{P_n + P_{n+1} + P_{n+2}}$
And at this point I wanted to generalize this pattern.
This is what I came up with: $W_{n+m} = 3^{m-1} + 3^{m-2}2^{P_n} + 3^{m-3}2^{P_n + P_{n+1}} + ... + 3^2 2^{\sum_{i=0}^{m-4}P_{n+i}} + 3^1 2^{\sum_{j=0}^{m-3}P_{n+j}} + 3^0 2^{\sum_{k=0}^{m-2}P_{n+k}}$
This is cool and seems to fit the pattern, but now if I go back and plug in $m = 1$, then I get
$$W_{n+1} = 1 = 3^{1-1} + 3^{1-2}2^{P_n} + 3^{1-3}2^{P_n + P_{n+1}} + ... + 3^2 2^{\sum_{i=0}^{1-4}P_{n+i}} + 3^1 2^{\sum_{j=0}^{1-3}P_{n+j}} + 3^0 2^{\sum_{k=0}^{1-2}P_{n+k}}$$
Which simplifies to
$$1 = 1 + 3^{-1} 2^{P_n} + 3^{-2} 2^{P_n + P_{n+1}} + ... + 3^2 2^{\sum_{i=0}^{-3} P_{n+i}} + 3^1 2^{\sum_{j=0}^{-2} P_{n+j}} + 3^0 2^{\sum_{k=0}^{-1}P_{n+k}}$$
Which further simplifies to
$$0 = \frac{2^{P_n}}{3} + \frac{2^{P_n + P_{n+1}}}{3^2} + ... + 3^2 2^{\sum_{i=0}^{-3} P_{n+i}} + 3^1 2^{\sum_{j=0}^{-2} P_{n+j}} + 3^0 2^{\sum_{k=0}^{-1}P_{n+k}}$$
This is really cool but I'm more than a touch lost at this point. Do I accept this as a mathematical truth? Or more likely, I screwed up, but where? Frankly, I don't know that plugging in any number for m will actually give a usable result. But I don't think I should be getting negative numbers in a summation. Perhaps I can't use summations like this? It does seem to have a cool wrap-around effect from negative infinity to positive infinity with the 3s.
Any help would be appreciated.
 A: There are two separate things going on here:

*

*What happens with a summation whose upper limit is lower than the lower limit?

*How do I generalize a summation pattern like this in a way that still gets the right answers in the original basic cases?

1. "Negative Summations"
${\displaystyle \sum_{i=a}^{b}} f(i)$ generally means something like "the sum of everything in $\{f(i)\mid a\le i\le b\}$". So something like ${\displaystyle \sum_{i=5}^{4}} f(i)$ would be the sum of the elements of $\{f(i)\mid 5\le i\le 4\}=\{f(i)\mid \text{False}\}=\varnothing$. What what is the sum of the empty set? Well, it's useful for a lot of patterns to follow the convention that the "empty sum" is $0$. So all of these "negative summations" would conventionally give $0$.
2. A General Formula
But that would seem to give you incorrect expressions since it looks like $W_{n+1}$ would be a sum of positive terms including the term $3^1 2^{\sum_{j=0}^{-2} P_{n+j}}=3>1$.
Instead, we need to write the pattern a little differently. $``\ldots"$ is a bit vague, so we can solve the problem by using more summation notation. Following the convention that the empty sum is $0$, we can use $j$ as the index in the exponent of $2$, and $i$ as the index that tells us how many summands are in the exponent of $2$, to arrive at this formula:
$$W_{n+m}=\sum_{i=0}^{m-1}3^{m-1-i}*2\texttt{^}\left(\sum_{j=1}^{i}P_{n+j-1}\right)$$
Then when $m=1$, we have
\begin{align}W_{n+1}&=\sum_{i=0}^{0}3^{-i}*2\texttt{^}\left(\sum_{j=1}^{i}P_{n+j-1}\right)
\\&=3^{-0}*2\texttt{^}\left(\sum_{j=1}^{0}P_{n+j-1}\right)
\\&=3^{-0}*2\texttt{^}\left(0\right)\text{ (empty sum)}
\\&=3^{0}*2^0=1\checkmark\end{align}
As an extra check, when $m=3$, we have
\begin{align}W_{n+3}&=\sum_{i=0}^{2}3^{2-i}*2\texttt{^}\left(\sum_{j=1}^{i}P_{n+j-1}\right)
\\&=3^{2-0}*2\texttt{^}\left(\sum_{j=1}^{0}P_{n+j-1}\right)+3^{2-1}*2\texttt{^}\left(\sum_{j=1}^{1}P_{n+j-1}\right)+3^{2-2}*2\texttt{^}\left(\sum_{j=1}^{2}P_{n+j-1}\right)
\\&=3^{2}*2\texttt{^}\left(0\right)+3^{1}*2\texttt{^}\left(P_{n}\right)+3^{0}*2\texttt{^}\left(P_{n}+P_{n+1}\right)
\\&=3^2 + 3^1 2^{P_n} + 3^0 2^{P_n + P_{n+1}}\checkmark\end{align}
