How many integers from 0 to 50, inclusive, have a remainder of 1 when divided by 3 ?
You need to think in that way , k=3a+1 so try few numbers to find how the sequance behave ..
K= 3*0+1 -------> 1
K=3*1+1 --------> 4
K=3*2+1 --------> 7
K=3*3+1 --------> 10
K=3*4+1 --------> 13
so you can see that between 0-10 there is 3 differents numbers that are divisible by 3 with a reminder of 1 ( never count for the sequence the first and the last item )
So because the sequance continue to behave in the same way between 0-50 it is like we had 5 sequance between 0-10 so there will be 3*5=15 items . So the next to last a of the sequance is a=15
and to get the final answer we need to add the first a when a=0 et the last one when a=16 you get to 17 items
Cheers