How can I tell whether this set is closed or open?

It's open. To see this, note that the only problematic points are $(\frac1{n+1}, y)$ for $y \in ]0,n[$. But $]\frac1{n+2}, \frac1{n}[ \times ]y-\epsilon, y+\epsilon[ \subset$ of the original set, where $\epsilon = \min\left\{ \frac{n-y}{2}, \frac{y}{2} \right\}$.


Pick a point in the set. It must belong to one of the products in the union.

Say, it belongs to $\left[\frac{1}{k+1},\frac{1}{k}\right[ \times \left]0,k\right[$.

Let the point be $(x,y)$. We have $\frac1{k+1} \le x < \frac1k$ and $0 < y < k$.

Now, we consider $\left]\frac1{k+2},\frac{x+1/k}2\right[ \times \left]\frac y2,\frac{y+k}2\right[$ and prove that it is contained in $A$.

The set is also open

Since there is an open set around every point in $A$, we can conclude that $A$ is open.