Additive energy of a frequency graph (source code)

= Additive energy of a frequency graph
{title2=$E(\{(h,\theta(h)):h\in H\})$}

For a set of shifts $H$ and a map $\theta$ into a <circle group>, this <additive energy> counts quadruples whose shift sums and frequency sums both agree. It is the <additive energy> of the graph of $\theta$ in the product <abelian group>.