Generate the sequence a(n) when each element is the minimum integer multiple m such that the digit sum of n times m is equal to n.



Task
 Find the first 40 elements of the sequence.


Stretch
 Find the next 30 elements of the sequence.


See also
 OEIS:A131382 - Minimal number m such that Sum_digits(n*m)=n




with javascript_semantics
integer c = 0, n = 1
while c<70 do
    integer m = 1
    while true do
        integer nm = n*m, t = 0
        while nm do
            t += remainder(nm,10)
            nm = floor(nm/10)
        end while
        if t=n then exit end if
        m += 1
    end while
    c += 1
    printf(1,"%-8d%s",{m,iff(remainder(c,10)=0?"\n":"")})
    n += 1
end while
