I'm having hard time understanding input/ output

If input is 2 3 5 1 and output is 9 12 18 6 then if I put is 7 what is output

1 6 ---> 3x1 + 3 = 6

2 9 ---> 2x3 + 3 = 9
3 12---> 3x3 + 3 = 12
5 18---> 3x5 + 3 = 18
...
7 ------->

x --------> 3x + 3 <---- your rule