There is n arithmetic means between 9 and 27. If the ratio of the last mean to the first mean is 2 : 1, find the value of n.