Couldn't understand the series

Please explain the logic of series and i will do the coding part.

hi @ishayadav092001_5692c65fe727bbd4
Sample Input
10 (n1)
4 (n2)

here you have to print first 10 elements of series (3*n+2) but they should not multiple of 4

how to find series ??
you just have to put values of n like 0,1,2,3,4…
so series will become 2,5,8,11,14,…
now pick n1 elements that are not multiple of n2
Refer this code -->

@ishayadav092001_5692c65fe727bbd4
I hope it’s clear now??

Yes cleared. Thank you. :+1:

1 Like

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.

The logic of series and I will do the coding part.