@Placholdr Oh haha... Tbh it seems like the most straightforward way to me though.
Also, after closing the computer I realised there's a mistake (don't try to do maths quickly when tired 😅): triangle number formula is 1/2m(m+1) instead of m-1 and p/q is in the (p+q-1)-th subsequence not the (p+q)-th.