Simplification of formula with finite set partial sums

25 Views Asked by At

As part of a proof I am working on, I have derived the following formula: $$f(n,P)=\frac{3^{\#P}n+\sum_{a=0}^{\#P-1}3^{a}(2^{(\sum_{b=a}^{\#P-a-1}P_{b})})}{2^{\sum P}} \\\text{where }n\in2\mathbb{Z}+1,\text{ P=Ordered finite set of #P cardinality with }P_i\in\mathbb{Z}^{+}$$ where any specific n has a specific, assume known, ordered set P. Obviously the exponent of 2 is partial sums of P, with the assumption that $\sum =0$ when initial b>#P-a-1

For example: For P=(1,1,1,2,1,1,4), #P=7 the formula above expands out to $$\frac{3^7 n+3^6 2^0+3^5 2^1+3^4 2^2+3^3 2^3+3^2 2^5+3^1 2^6+3^0 2^7}{2^{11}}$$ which for n=-17 equals -17 (trivial specific example)

What I am looking for is any insight on possible simplification of this formula, either notation or structure.