
Write a program to print the first x terms of the mathematical series 3N + 2 which are not multiples of 4.
The series is defined as:
T(N) = 3N + 2, where N is a positive integer starting from 1. Your task is to print the first x terms of this series, but you should exclude any term that is a multiple of 4.
Integer x
Output format :
Terms of series (separated by space)
1 <= x <= 1,000
10
5 11 14 17 23 26 29 35 38 41
4
5 11 14 17
Input is 4 and print the first 4 numbers that are not divisible by 4 and are of the form 3N + 2, where k is a non-negative integer.