\documentclass[11pt]{scrartcl}
\usepackage{evan}

\begin{document}
\title{Marcin E Kuczma}
\subtitle{Evan Chen}
\author{Twitch Solves ISL}
\date{Episode 122}
\maketitle

\section*{Problem}
Find all functions $f$ taking integer-lattice vectors in $\ZZ^2$ to $\RR$
such that $f(\mathbf a + \mathbf b) = f(\mathbf a) + f(\mathbf b)$
whenever $\mathbf a \perp \mathbf b$.

\section*{Video}
\href{https://www.youtube.com/watch?v=2mn3De0yc8A&list=PLi6h8GM1FA6yHh4gDk_ZYezmncU1EJUmZ}{\texttt{https://youtu.be/2mn3De0yc8A}}

\section*{External Link}
\url{https://aops.com/community/p27461531}

\newpage

\section*{Solution}
Abbreviate $f\left( \left< x,y\right> \right)$ to just $f(x,y)$.
Note that the set of solutions is obviously an $\RR$-vector space.
Consider the four solutions:
\begin{align*}
  f_1(x,y) &\coloneqq x \\
  f_2(x,y) &\coloneqq y \\
  f_3(x,y) &\coloneqq x^2+y^2 \\
  f_4(x,y) &\coloneqq (x\%2) - (y\%2).
\end{align*}
(Verification left as exercise.)
They are linearly independent, so any linear combination of this works,
and we have found a $4$-dimensional space of solutions.

We now show conversely that the dimension of
the vector space of solutions is at most $4$.
To begin, first note that
\[ f(x,y) = f(x,0) + f(0,y). \]
In particular, $f(0,0) = 0$.
Next, note that for all $n \ge 1$
\begin{align*}
  f(n,0) + f(0,-1) + f(1,0) + f(0,n)
  &= f(n,-1) + f(1,n) \\
  &= f(n+1,n-1) \\
  &= f(n+1,0) + f(0,n-1) \\
  \implies f(n+1,0) &= f(n,0) + f(0,-1) + f(1,0) + f(0,n) - f(0,n-1)
\end{align*}
By writing the analogous equations for $f(-(n+1),0)$,
$f(0,n+1)$ and $f(0,-(n+1))$,
it follows that all the values of $f$ are determined by these recursions
as soon as the ``initial'' values of
$f(1,0)$, $f(-1,0)$, $f(0,1)$, $f(0,-1)$ are chosen.
Ergo, the space of valid $f$ is at most four-dimensional, as needed.

\end{document}
