What's the crud in the pan with potatoes and oil?
The coating you are talking about is potato starch that is browning on the bottom of the pan, similar to what happens to roux when it is prepared. If you deglaze the pan using alcohol, it will come right off without any effort (water works too, though more is needed).

As for how to get the potatoes not to stick, it's important that the pan and the oil are quite hot when the potatoes are added to the pan. As described at Newton Ask a Scientist, the hot oil encourages a steam barrier to appear between the potatoes and the pan, temporarily protecting the potatoes from sticking and encouraging the formation of a crust that will permanently keep them from sticking. Depending on the amount of potato being cooked, the amount of oil added to the pan will have to be adjusted for thermal mass, since the addition of uncooked potatoes will cause the oil to cool down very quickly.