Domanda di colloquio di Norfolk Southern

Write a code to find the nth term in a sequence