So you want all numbers accept those ending in a 0,1 or 4? If this is correct then put an IF statement inside your FOR loop with something like:
if a~= 0 && a~= 1 && a~=4, where a is the last digit of the current step being used by the for loop. Put the for loop incrementer
(i = i+1) after the END of this IF statement.
How you calculate, a, is up to you...

see Jan's comment for selecting the last digit, or transform the number into a string,(string = num2str(current for loop)) then ask for its length, (digit = length(string)) and if digit (this will always be the last digit) of string is not equal to 0,1,4 or 7, then proceed. some rough code..
for i = 0:YourEndPoint
s = num2str(i);
d = length(s);
if s(d) ~= 0 && ~=1 && ~= 4 && ~= 7
your code for what you want
end
i = i+1
end
Sorry about the late reply, people are really on it here and you probably already have your solution.

r=9; %number of repetitions of the sequence, ex 9, max is 89
b=[2 3 5 6 8 9]; %original sequence
c=repmat(b,r,1); %repeat the sequence in each row
d=0:10:10*r-1; %create vector with sum values
e=repmat(d,6,1)'; %create array from vector
f=(c+e)'; %now all in the right place do the sum
f(:)' %put the values in just a vector