If the G.P.'s 5, 10, 20, ...... and 1280, 640, 320, .... have their nth terms equal, find the value of n.