If $A$ is your amount you're looking for $k_1,\ldots,k_n$ you want to minimize
$$
f(k_1,\dots,k_n) = k_1 + \ldots +k_n
$$
subjected to
$$
A = k_1 v_1 + \ldots k_n v_n
$$
As dynamic programming I would procede as follow... say you want to add $v_i$ to the change, then as next step you will try to minimize the amount the change for the amount $A - v_i$, assuming $A \geq v_i$ of course. So basically for each coin you add the coin to the feasible solution, and recurse for the problem $A - v_i$, once the recursion is over you pick the smallest set of coins. For the greedy solution you iterate from the largest value, keep adding this value to the solution, and then iterate for the next lower coin etc.
I think though you can work out this by simply using divisions. Basically $k_n = \frac{A}{v_n}, k_{n-1} = \frac{A - k_nv_n}{v_{n-1}}, \ldots k_{n-i} = \frac{A - k_n v_n - \ldots k_{n - i + 1} v_{n-i+1}}{v_{n-1}}$ etc... which essentially I think is the solution for the greedy strategy.