Wrong answer and test case failed

why this code in below mentioned url cannot pass all the test cases?
please tell the mistake in the code along with the correct answer.

Consider input:
3
2
We need to print first 3 terms starting from n = 1 in the given series (3n + 2) which are not divisible by 2.
In that case numbers starting from n = 1 are 5, 8, 11, 14, 17, 23… and so on. but we need to print only those numbers which are not divisible by 2, which are, 5, 11, 17.
so ans will be
5
11
17

But your code’s output:
5
11

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.