How do I obtain the closure of this set ? (plus a few integration on it) Here is a problem which I came across recently and which I found quite cute and somewhat strange at a first look. Although I haven't tried it thoroughly, I'm standing here mainly for an insightful hint or answer in aim for a deep and clear understanding of the problem rather than the answer or even the proof itself. Thanks in advance!
Let $\mathcal{P}=\{p_1,p_2,\ldots,p_n,\ldots \}$ be the set of all primes. Consider the sets $$ P_k=\left\{\left(\frac{m}{p_k}, \frac{n}{p_k}\right)\in \mathbb{Q}^2 : m,n = 1,2,\ldots,p_k - 1\right\}, \qquad P=\bigcup_{k=1}^{\infty}P_k. $$
Now, I shall find the closure of $P$ on $[0,1]\times[0,1].$ Moreover, it must be shown that for any line $\ell$ such that $\ell$ is parallel to the $X$ or $Y$ axis, $|\ell\cap P|<\aleph_0.$
As a bonus question, one can consider the function $\psi\colon[0,1]\times[0,1]\to \{0,1\}$ given by $$\psi(x,y)= \left\{\begin{array}{cc}
   1,& \textrm{if  $x \in P$} \\
   0,& \textrm{if  $x \notin P$}
   \end{array}
   \right. $$
One must show that  both $\displaystyle\int\limits_0^1 \,dx \int\limits_0^1 \psi(x,y)\, dy\quad\textrm{and}\quad\int\limits_0^1 \,dy \int\limits_0^1 \psi (x,y) \,dx$ exist and have the same value, but $\psi$ is not (Riemann-)integrable.
I'm stuck mainly due to trying to prove it rigorously and that I want to tackle the problem with the less machinery possible.
 A: It would be useful to draw a diagram, but each of the Pk sets forms a finer and finer 'mesh' over the square [0,1]x[0,1].  Taking the union of all these sets would create a dense set in [0,1]x[0,1], so the closure would be be [0,1]x[0,1] itself. 
Now consider a vertical line x=m.  We have two possibilities, m is irrational and m is rational.  If m is irrational, then it should be clear that the line does not hit any of the points in P.   If m is rational, then m=p/q where p and q are positive integers.  If q is prime, then the line will intersect with a countable number of points {  (p/q, 1/q), (p/q, 2/q), (p/q, 3/q)....} . If q is not prime, then q can be factored into primes, q1q2q3... - it should be clear that m cannot be a member of any Pk.  
Finally, the double integrals. Evaluating the double integrals would involve integrating along the x or y axes, then the y or x.  Since we have seen that any vertical or horizonal line through P only has a countable number of points, the given integrand will contribute 0 to the integral,  so the Lebesgue integrals exist.  The Riemann integrals do not exist, since the inf and sup of the Riemann sums are 0 and 1.
So, I don't think any heavy machinery has been employed - basic properties of rationals and geometry, a bit of point set topology and the basics of Riemann and Lebesgue integration.
