Minimum steps to one problem bottm up

In the if statements…shouldn’t it be i%2 and i %3…instead of n%2 and n%3…

Yes for the bottom up appoach, it must be i(which is the current element)