interval centred about 0. This was extended to even $|S|$ by Lev in [@lev_max]. In fact, their arguments show that if $S \subseteq {\mathbb{Z}}$ is a set, and $S'$ is an interval centred about 0 of the same size, then $T_{a_1, a_2, a_3}(S) {\leqslant}T_{1,1,1}(S')$. The ideas behind their approaches involve rearrangement inequalites, which are discussed in detail in [@HLP Chapter 10], and which inspire some of the arguments in this paper.

Similarly, it is shown by Green and Sisask in [@GreenSisask Theorem 1.2] and by Lev and Pinchasi in [@LevPinchasi Theorem 2] respectively that, if $(a_1, a_2, a_3) = (1, -2, \pm 1)$, then $T(S)$ is again maximised when $S$ is an interval centred at 0.

The set of solutions to $x_1 - 2x_2 + x_3 = 0$ is precisely the set of three-term arithmetic progressions; that is, the set of affine shifts of the set $\{0, 1, 2\}$. By analogy with this, Bhattacharya, Ganguly, Shao and Zhao considered longer arithmetic progressions; in [@uppertails Theorem 2.4], they proved that the number of $k$ term arithmetic progressions in a set $S$ of $n$ integers is maximised when $S$ is an interval.

Ganguly asked [@pc_ganguly] about other affine patterns; in particular, finding 