Asking about how to minimize the effect of a not so good thesis due to abandoning by supervisor without even telling in Phd Application Form
Three things: 

1) Your angle should be that due to local institutional factors such as expertise availability in your sub-specialist field you have had to pursue your strong interest in number theory with intermittent supervision. Therefore the work you submit largely represents your own drive to pursue this sub-specialty and is the product of your own self-discipline and self-taught knowledge without the high level supervisory input afforded to some other students. This is one of the reasons why you are applying to department x, because the expertise aligns with your passion and you do not have access to it at home. You could even consider saying that you would be very interested to receive feedback on your work as well as being considered for the application. 

2) You should also seek feedback anyway on your work beforehand if possible. It does not necessarily have to be a professor and does not have to be face to face locally. I don't know if this is the done thing in maths, but perhaps approach an academic (who you know has done similar work) with a specific question based on your work. You might get a positive response and who knows where it will lead. 

3) You seem quite upset about whatever was going on. Relax and let it go, because these sorts of behaviours are encountered all the time (and a lot worse actually). Don't take it personally, you just have to find a work-around. It is what it is, let it go and work around it.