I have a quantity $Q(x,y)$, such that $x \in \{-n \dots n \}$ and $y \in \{ 0 \dots n \}$ where $n \in \{ 1, 2, 3, 4 \dots \}$ is a positive integer. It turns out that
With $n=1$, $Q(x,y) = 1$ for $(x,y) = (-1,1), (1,0)$.
With $n=2$, $Q(x,y) =1$ for $(x,y) = (-2,2), (0,1), (2,0)$.
With $n=3$, $Q(x,y)=1$ for $(x,y) = (-3,3), (-1,2), (1,1), (3,0)$.
With $n=4$, $Q(x,y)=1$ for $(x,y) = (-4,4), (-2,3), (0,2), (2,1), (4,0)$.
For all other $(x,y)$ for a given $n$ $Q(x,y) =0$.
My question is, can $Q(x,y)$ be written in terms of some compact notation say Dirac delta function, or in some other manner that will summarize above observations?
$$ Q(x,y)=\delta_{x,2(n-y)+1}\;. $$