0

Pyramid Exponentiation
The Pyramid Exponentiation of an integer, PE(x), is defined as:
sum of (x^0, x^1 ... x^x ... x^1, x^0)
For example, PE(2) yields sum(1,2,4,2,1), which sums to 10.
PE(3) is sum(1,3,9,27,9,3,1), resulting in 53.
The Challenge
Given a natural number (n > 0), calculate...