% © Evan Chen
% Downloaded from https://web.evanchen.cc/
\documentclass[11pt]{scrartcl}
\usepackage[sexy]{evan}
\ihead{\footnotesize\textbf{\thetitle}}
\ohead{\footnotesize\href{http://web.evanchen.cc}{\ttfamily web.evanchen.cc},
updated \today}
\title{IMO 2015 Solution Notes}
\date{\today}
\begin{document}
\maketitle
\begin{abstract}
This is a compilation of solutions
for the 2015 IMO.
Some of the solutions are my own work,
but many are from the official solutions provided by the organizers
(for which they hold any copyrights),
and others were found by users on the Art of Problem Solving forums.
These notes will tend to be a bit more advanced and terse than the ``official''
solutions from the organizers.
In particular, if a theorem or technique is not known to beginners
but is still considered ``standard'', then I often prefer to
use this theory anyways, rather than try to work around or conceal it.
For example, in geometry problems I typically use directed angles
without further comment, rather than awkwardly work around configuration issues.
Similarly, sentences like ``let $\mathbb{R}$ denote the set of real numbers''
are typically omitted entirely.
Corrections and comments are welcome!
\end{abstract}
\tableofcontents
\newpage
\addtocounter{section}{-1}
\section{Problems}
\begin{enumerate}[\bfseries 1.]
\item %% Problem 1
We say that a finite set $\mathcal{S}$ of points in the plane
is \emph{balanced} if,
for any two different points $A$ and $B$ in $\mathcal{S}$,
there is a point $C$ in $\mathcal{S}$ such that $AC=BC$.
We say that $\mathcal{S}$ is \emph{centre-free} if for
any three different points $A$, $B$ and $C$ in $\mathcal{S}$,
there are no points $P$ in $\mathcal{S}$ such that $PA=PB=PC$.
\begin{enumerate}
\item[(a)] Show that for all integers $n\ge 3$,
there exists a balanced set consisting of $n$ points.
\item[(b)] Determine all integers $n\ge 3$ for which
there exists a balanced centre-free set consisting of $n$ points.
\end{enumerate}
\item %% Problem 2
Find all positive integers $a$, $b$, $c$ such that
each of $ab-c$, $bc-a$, $ca-b$ is a power of $2$
(possibly including $2^0=1$).
\item %% Problem 3
Let $ABC$ be an acute triangle with $AB > AC$.
Let $\Gamma$ be its circumcircle, $H$ its orthocenter,
and $F$ the foot of the altitude from $A$.
Let $M$ be the midpoint of $\ol{BC}$.
Let $Q$ be the point on $\Gamma$ such that $\angle HQA = 90^{\circ}$
and let $K$ be the point on $\Gamma$ such that $\angle HKQ = 90^{\circ}$.
Assume that the points $A$, $B$, $C$, $K$ and $Q$
are all different and lie on $\Gamma$ in this order.
Prove that the circumcircles of triangles $KQH$ and $FKM$
are tangent to each other.
\item %% Problem 4
Triangle $ABC$ has circumcircle $\Omega$ and circumcenter $O$.
A circle $\Gamma$ with center $A$
intersects the segment $BC$ at points $D$ and $E$,
such that $B$, $D$, $E$, and $C$ are all different
and lie on line $BC$ in this order.
Let $F$ and $G$ be the points of intersection of $\Gamma$ and $\Omega$,
such that $A$, $F$, $B$, $C$, and $G$ lie on $\Omega$ in this order.
Let $K = (BDF) \cap \ol{AB} \neq B$
and $L = (CGE) \cap \ol{AC} \neq C$
and assume these points do not lie on line $FG$.
Define $X = \ol{FK} \cap \ol{GL}$.
Prove that $X$ lies on the line $AO$.
\item %% Problem 5
Solve the functional equation
\[ f(x+f(x+y)) + f(xy) = x + f(x+y) + yf(x) \]
for $f \colon \RR \to \RR$.
\item %% Problem 6
The sequence $a_1,a_2,\dots$ of integers satisfies the conditions:
\begin{enumerate}[(i)]
\ii $1\le a_j\le2015$ for all $j\ge1$,
\ii $k+a_k\neq \ell+a_\ell$ for all $1\le k<\ell$.
\end{enumerate}
Prove that there exist two positive integers $b$ and $N$ for which
\[ \left\lvert\sum_{j=m+1}^n (a_j-b) \right\rvert \le 1007^2 \]
for all integers $m$ and $n$ such that $n > m\ge N$.
\end{enumerate}
\pagebreak
\section{Solutions to Day 1}
\subsection{IMO 2015/1, proposed by Netherlands}
\textsl{Available online at \url{https://aops.com/community/p5079689}.}
\begin{mdframed}[style=mdpurplebox,frametitle={Problem statement}]
We say that a finite set $\mathcal{S}$ of points in the plane
is \emph{balanced} if,
for any two different points $A$ and $B$ in $\mathcal{S}$,
there is a point $C$ in $\mathcal{S}$ such that $AC=BC$.
We say that $\mathcal{S}$ is \emph{centre-free} if for
any three different points $A$, $B$ and $C$ in $\mathcal{S}$,
there are no points $P$ in $\mathcal{S}$ such that $PA=PB=PC$.
\begin{enumerate}
\item[(a)] Show that for all integers $n\ge 3$,
there exists a balanced set consisting of $n$ points.
\item[(b)] Determine all integers $n\ge 3$ for which
there exists a balanced centre-free set consisting of $n$ points.
\end{enumerate}
\end{mdframed}
For part (a), take a circle centered at a point $O$,
and add $n-1$ additional points by adding pairs of points
separated by an arc of $60^{\circ}$ or similar triples.
An example for $n = 6$ is shown below.
\begin{center}
\begin{asy}
size(4cm);
draw(unitcircle);
dotfactor *= 1.5;
pair O = (0,0);
dot("$O$", O, dir(-90), blue);
pair A = dir(37);
pair B = A*dir(-60);
pair C = B*dir(-60);
pair X = dir(117);
pair Y = X*dir(60);
draw(O--X--Y--cycle, deepgreen+dashed);
dot(X, deepgreen);
dot(Y, deepgreen);
draw(B--O--A--B--C--O, red+dashed);
dot(A, red);
dot(B, red);
dot(C, red);
\end{asy}
\end{center}
For part (b), the answer is odd $n$, achieved by taking a regular $n$-gon.
To show even $n$ fail, note that some point is on the perpendicular bisector of
\[ \left\lceil \frac 1n \binom n2 \right\rceil = \frac{n}{2} \]
pairs of points, which is enough.
(This is a standard double-counting argument.)
As an aside, there is a funny joke about this problem.
There are two types of people in the world:
those who solve (b) quickly and then take forever to solve (a),
and those who solve (a) quickly and then can't solve (b) at all.
(Empirically true when the Taiwan IMO 2014 team was working on it.)
\pagebreak
\subsection{IMO 2015/2, proposed by Serbia}
\textsl{Available online at \url{https://aops.com/community/p5079630}.}
\begin{mdframed}[style=mdpurplebox,frametitle={Problem statement}]
Find all positive integers $a$, $b$, $c$ such that
each of $ab-c$, $bc-a$, $ca-b$ is a power of $2$
(possibly including $2^0=1$).
\end{mdframed}
Here is the solution of \textbf{Telv Cohl},
which is the shortest solution I am aware of.
We will prove the only solutions are $(2,2,2)$, $(2,2,3)$,
$(2,6,11)$ and $(3,5,7)$ and permutations.
WLOG assume $a \ge b \ge c > 1$, so $ab-c \ge ca-b \ge bc-a$.
We consider the following cases:
\begin{itemize}
\ii If $a$ is even, then
\begin{align*}
ca-b &= \gcd (ab-c, ca-b) \le \gcd (ab-c, a(ca-b)+ab-c) \\
&= \gcd\left( ab-c, c(a^2-1) \right).
\end{align*}
As $a^2-1$ is odd, we conclude $ca-b \le c$.
This implies $a=b=c=2$.
\ii If $a$, $b$, $c$ are all odd, then $a > b > c > 1$ follows.
Then as before
\[ ca-b \le \gcd (ab-c, c(a^2-1))
\le 2^{\nu_2(a^2-1)} \le 2a+2 \le 3a-b \]
so $c = 3$ and $a = b+2$.
As $3a-b = ca-b \ge 2(bc-a) = 6b-2a$ we then conclude $a=7$ and $b=5$.
\ii If $a$ is odd and $b$, $c$ are even, then $bc-a=1$
and hence $bc^2 - b - c = ca - b$.
Then from the miraculous identity
\[ c^3-b-c = (1-c^2)(ab-c) + a(\underbrace{bc^2-b-c}_{=ca-b}) + (ca-b) \]
so we conclude $\gcd(ab-c, ca-b) = \gcd(ab-c, c^3-b-c)$, in other words
\[ bc^2-b-c = ca-b = \gcd(ab-c, ca-b) = \gcd(ab-c, c^3-b-c). \]
We thus consider two more cases:
\begin{itemize}
\ii If $c^3-b-c \neq 0$ then
the above implies $|c^3-b-c| \ge bc^2-b-c$.
As $b \ge c > 1$, we must actually have $b = c$,
thus $a = c^2-1$.
Finally $ab-c = c(c^2-2)$ is a power of $2$, hence $b=c=2$, so $a=3$.
\ii In the second case, assume $c^3-b-c = 0$, hence $c^3-c$.
From $bc-a=1$ we obtain $a=c^4-c^2-1$,
hence
\[ ca-b = c^5-2c^3 = c^3(c^2-2) \]
is a power of $2$, hence again $c = 2$.
Thus $a=11$ and $b=6$.
\end{itemize}
\end{itemize}
This finishes all cases, so the proof is done.
\pagebreak
\subsection{IMO 2015/3, proposed by Ukraine}
\textsl{Available online at \url{https://aops.com/community/p5079655}.}
\begin{mdframed}[style=mdpurplebox,frametitle={Problem statement}]
Let $ABC$ be an acute triangle with $AB > AC$.
Let $\Gamma$ be its circumcircle, $H$ its orthocenter,
and $F$ the foot of the altitude from $A$.
Let $M$ be the midpoint of $\ol{BC}$.
Let $Q$ be the point on $\Gamma$ such that $\angle HQA = 90^{\circ}$
and let $K$ be the point on $\Gamma$ such that $\angle HKQ = 90^{\circ}$.
Assume that the points $A$, $B$, $C$, $K$ and $Q$
are all different and lie on $\Gamma$ in this order.
Prove that the circumcircles of triangles $KQH$ and $FKM$
are tangent to each other.
\end{mdframed}
Let $L$ be on the nine-point circle with $\angle HML = 90^{\circ}$.
The negative inversion at $H$ swapping $\Gamma$
and nine-point circle maps
\[ A \longleftrightarrow F, \quad
Q \longleftrightarrow M, \quad
K \longleftrightarrow L.
\]
In the inverted statement, we want line $ML$ to be
tangent to $(AQL)$.
\begin{center}
\begin{asy}
size(10cm);
pair A = dir(80);
pair B = dir(220);
pair C = dir(-40);
filldraw(unitcircle, opacity(0.1)+yellow, orange);
pair O = circumcenter(A, B, C);
pair H = orthocenter(A, B, C);
pair Q = IP(CP(midpoint(A--H), H), unitcircle);
pair N = midpoint(H--Q);
pair T = midpoint(A--H);
pair N_9 = midpoint(O--H);
pair M = midpoint(B--C);
pair F = foot(A, B, C);
filldraw(circumcircle(M, F, N), opacity(0.1)+yellow, heavyred);
pair L = M+T-N;
pair K = foot(Q, L, H);
draw(A--B--C--cycle, red+1);
draw(A--F, red+1);
draw(T--M--L--N, red);
draw(M--Q--A, brown);
draw(Q--K--L, brown);
filldraw(A--Q--L--cycle, opacity(0.1)+cyan, cyan);
dot("$A$", A, dir(A));
dot("$B$", B, dir(B));
dot("$C$", C, dir(C));
dot("$O$", O, dir(O));
dot("$H$", H, dir(H));
dot("$Q$", Q, dir(Q));
dot("$N$", N, dir(N));
dot("$T$", T, dir(T));
dot("$N_9$", N_9, dir(N_9));
dot("$M$", M, dir(M));
dot("$F$", F, dir(F));
dot("$L$", L, dir(L));
dot("$K$", K, dir(K));
/* TSQ Source:
!size(10cm);
A = dir 80
B = dir 220
C = dir -40
unitcircle 0.1 yellow / orange
O = circumcenter A B C
H = orthocenter A B C
Q = IP CP midpoint A--H H unitcircle
N = midpoint H--Q
T = midpoint A--H
N_9 = midpoint O--H
M = midpoint B--C
F = foot A B C
circle M F N 0.1 yellow / heavyred
L = M+T-N
K = foot Q L H
A--B--C--cycle red+1
A--F red+1
T--M--L--N red
M--Q--A brown
Q--K--L brown
A--Q--L--cycle 0.1 cyan / cyan
*/
\end{asy}
\end{center}
\begin{claim*}
$\ol{LM} \parallel \ol{AQ}$.
\end{claim*}
\begin{proof}
Both are perpendicular to $\ol{MHQ}$.
\end{proof}
\begin{claim*}
$LA = LQ$.
\end{claim*}
\begin{proof}
Let $N$ and $T$ be the midpoints of $\ol{HQ}$ and $\ol{AH}$,
and $O$ the circumcenter.
As $\ol{MT}$ is a diameter, we know $LTNM$ is a rectangle,
so $\ol{LT}$ passes through $O$.
Since $\ol{LOT} \perp \ol{AQ}$ and $OA=OQ$, the proof is complete.
\end{proof}
Together these two claims solve the problem.
\pagebreak
\section{Solutions to Day 2}
\subsection{IMO 2015/4, proposed by Silouanos Brazitikos (HEL)}
\textsl{Available online at \url{https://aops.com/community/p5083464}.}
\begin{mdframed}[style=mdpurplebox,frametitle={Problem statement}]
Triangle $ABC$ has circumcircle $\Omega$ and circumcenter $O$.
A circle $\Gamma$ with center $A$
intersects the segment $BC$ at points $D$ and $E$,
such that $B$, $D$, $E$, and $C$ are all different
and lie on line $BC$ in this order.
Let $F$ and $G$ be the points of intersection of $\Gamma$ and $\Omega$,
such that $A$, $F$, $B$, $C$, and $G$ lie on $\Omega$ in this order.
Let $K = (BDF) \cap \ol{AB} \neq B$
and $L = (CGE) \cap \ol{AC} \neq C$
and assume these points do not lie on line $FG$.
Define $X = \ol{FK} \cap \ol{GL}$.
Prove that $X$ lies on the line $AO$.
\end{mdframed}
Since $\ol{AO} \perp \ol{FG}$ for obvious reasons,
we will only need to show that $XF = XG$,
or that $\dang KFG = \dang LGF$.
Let line $FG$ meet $(BDF)$ and $(CGE)$
again at $F_2$ and $G_2$.
\begin{center}
\begin{asy}
size(10cm);
pair A = dir(105);
pair B = dir(200);
pair C = dir(340);
real r = 1.337;
pair F = IP(CR(A, r), unitcircle);
pair G = OP(CR(A, r), unitcircle);
pair D = IP(CR(A, r), B--C);
pair E = OP(CR(A, r), B--C);
pair K = IP(circumcircle(B, D, F), A--B);
pair L = IP(circumcircle(C, E, G), A--C);
draw(unitcircle, orange);
draw(arc(A,r,160,380), orange);
filldraw(A--B--C--cycle, opacity(0.1)+lightred, red);
pair X = extension(F, K, G, L);
draw(F--G, red);
draw(F--X--G, lightblue);
pair F_2 = IP(circumcircle(B, F, D), F--G);
pair G_2 = IP(F--G, circumcircle(C, E, G));
filldraw(circumcircle(B, F, D), opacity(0.1)+yellow, lightblue);
filldraw(circumcircle(C, E, G), opacity(0.1)+yellow, lightblue);
draw(B--F_2--D--F--cycle, lightcyan);
draw(C--G_2--E--G--cycle, lightcyan);
dot("$A$", A, dir(A));
dot("$B$", B, dir(B));
dot("$C$", C, dir(C));
dot("$F$", F, dir(F));
dot("$G$", G, dir(G));
dot("$D$", D, dir(D));
dot("$E$", E, dir(E));
dot("$K$", K, dir(100));
dot("$L$", L, dir(L));
dot("$X$", X, dir(X));
dot("$F_2$", F_2, dir(70));
dot("$G_2$", G_2, dir(G_2));
/* TSQ Source:
A = dir 105
B = dir 200
C = dir 340
! real r = 1.337;
F = IP CR A r unitcircle
G = OP CR A r unitcircle
D = IP CR A r B--C
E = OP CR A r B--C
K = IP circumcircle B D F A--B R100
L = IP circumcircle C E G A--C
unitcircle orange
!draw(arc(A,r,160,380), orange);
A--B--C--cycle 0.1 lightred / red
X = extension F K G L
F--G red
F--X--G lightblue
F_2 = IP circumcircle B F D F--G R70
G_2 = IP F--G circumcircle C E G
circumcircle B F D 0.1 yellow / lightblue
circumcircle C E G 0.1 yellow / lightblue
B--F_2--D--F--cycle lightcyan
C--G_2--E--G--cycle lightcyan
*/
\end{asy}
\end{center}
\begin{claim*}
Quadrilaterals $FBDF_2$ and $G_2ECG$ are similar,
actually homothetic through $\ol{FG} \cap \ol{BC}$.
\end{claim*}
\begin{proof}
This is essentially a repeated application
of being ``anti-parallel'' through $\angle(FG, BC)$.
Note the four angle relations
\begin{align*}
\dang(FD, FG) = \dang(BC,GE) = \dang(G_2C,FG)
&\implies \ol{FD} \parallel \ol{G_2C} \\
\dang(F_2B, FG) = \dang(BC,FD) = \dang(GE,FG)
&\implies \ol{F_2B} \parallel \ol{GE} \\
\dang(FB, FG) = \dang(BC,GC) = \dang(G_2E,FG)
&\implies \ol{FB} \parallel \ol{G_2E} \\
\dang(F_2D, FG) = \dang(BC,FB) = \dang(GC,FG)
&\implies \ol{F_2D} \parallel \ol{GC}.
\end{align*}
This gives the desired homotheties.
\end{proof}
To finish the angle chase,
\begin{align*}
\dang GFK = \dang F_2BK &= \dang F_2BF - \dang ABF
= \dang F_2DF - \dang ABF \\
&= \dang F_2DF - \dang GCA
= \dang GCG_2 - \dang GCA \\
&= \dang LCG_2 = \dang LGF
\end{align*}
as needed.
(Here $\dang ABF = \dang GCA$ since $AF = AG$.)
\pagebreak
\subsection{IMO 2015/5, proposed by Dorlir Ahmeti (ALB)}
\textsl{Available online at \url{https://aops.com/community/p5083463}.}
\begin{mdframed}[style=mdpurplebox,frametitle={Problem statement}]
Solve the functional equation
\[ f(x+f(x+y)) + f(xy) = x + f(x+y) + yf(x) \]
for $f \colon \RR \to \RR$.
\end{mdframed}
The answers are $f(x) \equiv x$ and $f(x) \equiv 2-x$.
Obviously, both of them work.
Let $P(x,y)$ be the given assertion.
We also will let $S = \{t \mid f(t) = t\}$
be the set of fixed points of $f$.
\begin{itemize}
\ii From $P(0,0)$ we get $f(f(0)) = 0$.
\ii From $P(0,f(0))$ we get $2f(0) = f(0)^2$
and hence $f(0) \in \{0,2\}$.
\ii From $P(x,1)$
we find that $x+f(x+1) \in S$ for all $x$.
\end{itemize}
We now solve the case $f(0) = 2$.
\begin{claim*}
If $f(0) = 2$ then $f(x) \equiv 2-x$.
\end{claim*}
\begin{proof}
Let $t \in S$ be any fixed point.
Then $P(0,t)$ gives $2 = 2t$ or $t = 1$;
so $S = \{1\}$.
But we also saw $x+f(x+1) \in S$,
which implies $f(x) \equiv 2-x$.
\end{proof}
Henceforth, assume $f(0) = 0$.
\begin{claim*}
If $f(0) = 0$ then $f$ is odd.
\end{claim*}
\begin{proof}
Note that $P(1,-1) \implies f(1) + f(-1) = 1 - f(1)$
and $P(-1,1) \implies f(-1) + f(-1) = -1 + f(1)$,
together giving $f(1) = 1$ and $f(-1) = -1$.
To prove $f$ odd we now obtain more fixed points:
\begin{itemize}
\ii From $P(x,0)$ we find that $x+f(x) \in S$ for all $x \in \RR$.
\ii From $P(x-1,1)$ we find that $x-1+f(x) \in S$ for all $x \in \RR$.
\ii From $P(1, f(x)+x-1)$ we find $x+1+f(x) \in S$ for all $x \in \RR$.
\end{itemize}
Finally $P(x, -1)$ gives $f$ odd.
\end{proof}
To finish from $f$ odd, notice that
\begin{align*}
P(x,-x) &\implies f(x) + f(-x^2) = x - xf(x) \\
P(-x,x) &\implies f(-x) + f(-x^2) = -x + xf(-x)
\end{align*}
which upon subtracting gives $f(x) \equiv x$.
\pagebreak
\subsection{IMO 2015/6, proposed by Australia}
\textsl{Available online at \url{https://aops.com/community/p5083494}.}
\begin{mdframed}[style=mdpurplebox,frametitle={Problem statement}]
The sequence $a_1,a_2,\dots$ of integers satisfies the conditions:
\begin{enumerate}[(i)]
\ii $1\le a_j\le2015$ for all $j\ge1$,
\ii $k+a_k\neq \ell+a_\ell$ for all $1\le k<\ell$.
\end{enumerate}
Prove that there exist two positive integers $b$ and $N$ for which
\[ \left\lvert\sum_{j=m+1}^n (a_j-b) \right\rvert \le 1007^2 \]
for all integers $m$ and $n$ such that $n > m\ge N$.
\end{mdframed}
We give two equivalent solutions with different presentations,
one with ``arrows'' and the other by ``juggling''.
\paragraph{First solution (arrows)}
Consider the map
\[ f \colon k \mapsto k + a_k. \]
This map is injective,
so if we draw all arrows of the form $k \mapsto f(k)$
we get a partition of $\NN$ into one or more ascending chains
(which skip by at most $2015$).
There are at most $2015$ such chains,
since among any $2015$ consecutive points in $\NN$
every chain must have an element.
We claim we may take $b$ to be the number of such chains,
and $N$ to be the largest of the start-points of all the chains.
% TODO picture here would be nice
Consider an interval $I = [m+1, n]$.
We have that
\[ \sum_{m n, x \in c \right\}
- \min \left\{ x > m, x \in c \right\} \right]. \]
Thus the upper bound is proved by the calculation
\begin{align*}
\sum_{m n, x \in c \right\} - n)
- (\min \left\{ x > m, x \in c \right\} - m) \right] \\
&= \sum_{\text{chain } c}
\left[ (\min \left\{ x > n, x \in c \right\} - n) \right]
- \sum_{\text{chain } c} \left[
\min \left\{ x > m, x \in c \right\} - m \right] \\
&\le (1+2015+2014+\dots+(2015-(b-2)))-(1+2+\dots+b) = (b-1)(2015-b)
\end{align*}
from above (noting that $n+1$ has to belong to some chain).
The lower bound is similar.
\paragraph{Second solution (juggling)}
This solution is essentially the same,
but phrased as a juggling problem.
Here is a solution in this interpretation:
we will consider several balls thrown in the air,
which may be at heights $0, 1, 2, \dots, 2014$.
The process is as follows:
\begin{itemize}
\ii Initially, at time $t = 0$, there are no balls in the air.
\ii Then at each integer time $t$ thereafter,
if there is a ball at height $0$, it is caught;
otherwise a ball is added to the juggler's hand.
This ball (either caught or added) is then thrown to a height of $a_t$.
\ii Immediately afterwards, all balls have their height decreased by one.
\end{itemize}
The condition $a_k + k \neq \ell + a_\ell$ thus ensures that
no two balls are ever at the same height.
In particular, there will never be more than $2016$ balls,
since there are only $2015$ possible heights.
We claim we may set.
\begin{align*}
b &= \text{number of balls in entire process} \\
N &= \text{last moment in time at which a ball is added}.
\end{align*}
Indeed, the key fact is that if we let $S_t$ denote
the sum of the height of all the balls just after time $t+\half$, then
\[ S_{t+1} - S_t = a_{t+1} - b \]
After all, at each time step $t$, the caught ball is thrown to height $a_t$,
and then all balls have their height decreased by $1$,
from which the conclusion follows.
Hence the quantity in the problem is exactly equal to
\[ \left\lvert\sum_{j=m+1}^n (a_j-b) \right\rvert
= \left\lvert S_m - S_n \right\rvert. \]
For a fixed $b$, we easily have the inequalities
$0 + 1 + \dots + (b-1) \le S_t \le 2014 + 2013 + \dots + (2015-b)$.
Hence $|S_m - S_n| \le (b-1)(2015-b) \le 1007^2$ as desired.
\pagebreak
\end{document}