Below is the table of values of a function. Write the output when the input is n

input 3 5 9 n

output 1 3 7 ?

what is the last output number?