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




import "./math" for Int
import "./seq" for Lst
import "./fmt" for Fmt
 
var res = []
for (n in 1..70) {
    var m = 1
    while (Int.digitSum(m * n) != n) m = m + 1
    res.add(m)
}
for (chunk in Lst.chunks(res, 10)) Fmt.print("$,10d", chunk)