Extra Credit Discrete Math HW Help Needed

Hello,

My professor gave the class an extra credit HW question in which I need help in. I have to write a close form function f(p/q) = y.

The problem is I have to prove that the rational #'s Q are countable such that

positive Q = { p/q | p , q exist a positive Z}

She gave us a chart:

p/q 1 2 3 4 5

1 1/1 1/2 1/3 1/4 1/5

2 2/1 2/2 2/3 2/4 2/5

3 3/1 3/2 3/3 3/4 3/5

4 4/1 4/2 4/3 4/4 4/5

5 5/1 5/2 5/3 5/4 5/5

She said if we count horizontal it won't work cause we will have infinity and same goes for vertical, so she said if we go diagonally we can do it.

Q = {1/1, 1/2, 2/1, 1/3, 2/2, 3/1.....}

N = {1,2,3,4,5,6.....} <- countable

She want us to come up with a function such that if she wanted to find out what fraction is the 34th number is, she would know.

Ive been staring at this for quite a while and decided I need help. If anyone can hint me anything that would help, would be appreciated.

Thanks in advance.