GGK Tech interview question

pattern based question for n = 3 1 2 5 3 4 6