  Following attempts at an analytic proof of the Pentagonal Number Theorem, we
report on the discovery of a general principle leading to an unexpected
cancellation of oscillating sums. After stating the motivation, and our
theorem, we apply it to prove several results on the Prouhet-Tarry-Escott
Problem, integer partitions, and the distribution of prime numbers. Regarding
the Prouhet-Tarry-Escott problem, we show that \begin{align*} \sum_{|\ell|\leq
x}(4x^2-4\ell^2)^{2r}-\sum_{|\ell|<x}(4x^2-(2\ell+1)^2)^{2r}=\text{polynomial
w.r.t. } x \text{ with degree }2r-1. \end{align*} This can perhaps be proved
using properties of Bernoulli polynomials, but the claim fell out of our method
in a more natural and motivated way. Using this result, we solve an approximate
version of the PTE Problem, and in doing so our work in the approximate case
exceeds the bounds one can prove using a pigeonhole argument, which seems
remarkable. Also, we prove that $$ \sum_{\ell^2 < n} (-1)^\ell p(n-\ell^2)\
\sim\ (-1)^n 2^{-3/4} n^{-1/4} \sqrt{p(n)}, $$ where $p(n)$ is the usual
partition function. We get the following "Weak pentagonal number theorem", in
which we can replace the partition function $p(n)$ with Chebyshev $\Psi$
function: $$ \sum_{0 < \ell < \sqrt{xT}/2} \Psi([e^{\sqrt{x -
\frac{(2\ell)^2}{T}}},\ e^{\sqrt{x - \frac{(2\ell-1)^2}{T}}}])\
=\Psi(e^{\sqrt{x}})\left(\frac{1}{2} + O\left
(e^{-0.196\sqrt{x}}\right)\right), $$ where $T=e^{0.786\sqrt{x}}$, where
$\Psi([a,b]) := \sum_{n\in [a,b]} \Lambda(n)$ and $\Psi(x) = \Psi([1,x])$,
where $\Lambda$ is the von Mangoldt function. Note that this last equation (sum
over $\ell$) is stronger than one would get using a strong form of the Prime
Number Theorem and also a naive use of the Riemann Hypothesis in each interval,
since the widths of the intervals are smaller than $e^{\frac{1}{2} \sqrt{x}}$,
making the RH estimate ``trivial".
