I need to do a mixed factorial sum, using loops, to calculate: 1! x (5^max) + 2! x (5^(max-1)) + 3! x (5^(max-2)) + 4! x (5^(max-3)) + ... + max! x (5^1)
(Example using max = 4, but needs to do it with any number)
I can't seem to be able to get the simple factorial loop right when adding in the secondary loop.