Number of coins needed to make change
JavaScript (ES7),  36  35 bytes
Similar to other answers. Using a Black Magic formula instead of a lookup table.

f=n=&gt;n&amp;&amp;(n%10)**29%3571%4+f(n/10|0)

Try it online!
Here is a script that looks for \$(p,m)\$ pairs such that \$(n^p\bmod m)\bmod 4=a_n\$ for all \$n\in[0..9]\$.
It's worth noting that this code takes IEEE-754 precision errors into account. So the results are correct but the math is wrong.
With exact values, we could do instead:
$$\big((n \bmod 10)^{18}\bmod 4011\big)\bmod 4$$
Or better yet, as suggested by @dingledooper:
$$\big((n \bmod 10)^{55}\bmod 767\big)\bmod 4$$
For instance, in Python:
Python 2, 40 bytes

f=lambda n:n and(n%10)**55%767%4+f(n/10)

Try it online!

JavaScript (ES7), 71 bytes
Expects the amount as a string.
A naive recursive approach that subtracts one coin/bill at a time.

n=&gt;(k=10**n.length,g=t=&gt;+n?k&gt;n?g(t,k/=~++i%3?2:2.5):g(t+1,n-=k):t)(i=0)

Try it online!