MATLAB: How to produce all the odd numbers of the form 3x + 1 for any integer x in the interval [100, 1000].

odd numbers mat lab integer interval 100 1000

Question for my university coursework, got no idea where to begin

Best Answer

x=3*(100:1000)+1;
x=x(mod(x,2)==1)