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




: digit-sum ( u -- u )
  dup 10 < if exit then
  10 /mod recurse + ;
 
: main
  1+ 1 do
    0
    begin
      1+ dup i * digit-sum i =
    until
    8 .r i 10 mod 0= if cr else space then
  loop ;
 
70 main
bye