find the nth tern (an) generates the patter of sequnence 2,5,4, 5
8,27,64