n = 6
i = 2
j = 3

nat_nums, x = [], 0

while len(nat_nums) < n:
    if(x%i == 0 or x%j ==0):
        nat_nums.append(x)
    x += 1

print(nat_nums)
