TITLE: Magic $\mathbb{Z}\times\mathbb{Z}$-square
QUESTION [5 upvotes]: Is there an injective map $j:\mathbb{Z}\times \mathbb{Z} \to \mathbb{Z}$ satisfying: For every $z\in \mathbb{Z}$ we have $$\lim_{N\to \infty}\sum_{k=-N}^Nj(k,z) = 0 = \lim_{N\to \infty}\sum_{k=-N}^Nj(z,k)\text{ ?}$$
That is, for every $z\in \mathbb{Z}$ there is $N_0=N_0(z)\in \mathbb{N}$, such that for every integer $N\geq N_0$ we have 
$$\sum_{k=-N}^Nj(k,z) = 0 = \sum_{k=-N}^Nj(z,k).$$

Weaker variant:
For $A\subseteq \mathbb{N}=\{1,2,\ldots\}$ we let $\mu^+(A) = \lim\sup_{n\to\infty}\frac{|A\cap\{1,\ldots,n\}|}{n}.$ Given an injective map $j:\mathbb{Z}\times\mathbb{Z} \to \mathbb{Z}$, and given $z_0\in\mathbb{Z}$, we say that $N\in\mathbb{N}$ is equitable with respect to $z_0$ if $$\sum_{k=-N}^Nj(k,z_0) = 0 = \sum_{k=-N}^Nj(z_0,k).$$ We denote the set of equitable integers with respect to $z_0$ by $\text{Eq}(z_0)$.
We say that an injective map $j:\mathbb{Z}\times\mathbb{Z}\to\mathbb{Z}$ is a weakly magic square if $\mu^+(\text{Eq}(z))>0$ for all $z\in\mathbb{Z}$.
Is there a weakly magic square?

REPLY [3 votes]: With the unusual definition of convergence, and infinite space, there's so much flexibility that it's difficult to go wrong.  Here's one way to proceed.
Enumerate the rows and columns arbitrarily and suppose we are currently trying to fill some row or column $r$ having previously filled $n$ rows and columns such that the desired property holds.  Fill additional cells of $r$ (with distinct integers that have not been used so far) until 

The filled in cells of $r$ form an interval centred about $0$.
The sum of the entries of these cells is $0$.
Every integer from $-n$ to $n$ appears somewhere in the part of the grid filled so far.

Once this is done (and it remains to check that it can be), fill in the remaining entries of $r$ by pairs $a$, $-a$ where $a$ is a power of the $(n+1)$st prime $p_{n+1}$.
(1) and (3) are easy to ensure.  Once they are in place the filled in cells have some sum $s$.  We seek some $b$ such that $b$ and $-(b+s)$ are both unused; placing them in the cells at either end of the filled in interval brings the sum so far to $0$.
To see that there exists such a $b$, let $A$ be the set of absolute values of integers used so far.  $A$ contains only finitely many elements that are not powers of the first $n$ primes, so $A$ has zero density and its complement must contain an interval of length $|s|+1$.  The endpoints of this interval, with the correct signs added, can be taken as $b, -(b+s)$.
Continuing in this way eventually fills the entire grid using every integer exactly once.