Did some playing around and discovered a few interesting things. The first interesting thing is this:
Code:
>>>
[[1, 1, 1, 1, 1],
[2, 2, 2, 2, 2],
[4, 4, 4, 4, 4],
[6, 6, 6, 6, 6],
[9, 9, 9, 9, 9],
[13, 13, 13, 13, 13],
[18, 18, 18, 18, 18],
[24, 24, 24, 24, 24],
[31, 31, 31, 31, 31],
[39, 39, 39, 39, 39],
[49, 49, 49, 49, 49],
[60, 60, 60, 60, 60],
[73, 73, 73, 73, 73],
[87, 87, 87, 87, 87],
[103, 103, 103, 103, 103],
[121, 121, 121, 121, 121],
[141, 141, 141, 141, 141],
[163, 163, 163, 163, 163],
[187, 187, 187, 187, 187],
[213, 213, 213, 213, 213],
[242, 242, 242, 242, 242],
[273, 273, 273, 273, 273],
[307, 307, 307, 307, 307],
[343, 343, 343, 343, 343],
[382, 382, 382, 382, 382],
[424, 424, 424, 424, 424],
[469, 469, 469, 469, 469],
[517, 517, 517, 517, 517],
[568, 568, 568, 568, 568],
[622, 622, 622, 622, 622],
[680, 680, 680, 680, 680],
[741, 741, 741, 741, 741],
[806, 806, 806, 806, 806],
[874, 874, 874, 874, 874],
[946, 946, 946, 946, 946],
[1022, 1022, 1022, 1022, 1022],
[1102, 1102, 1102, 1102, 1102],
[1186, 1186, 1186, 1186, 1186],
[1274, 1274, 1274, 1274, 1274],
[1366, 1366, 1366, 1366, 1366]]
>>>
Notice a pattern? Logically, there is only 1 way to make 4 cents, and there are two ways to make 5 cents. There would be 2 ways to make 6 cents since those pennies don't matter. With this intuition, I guess you'd only need to track the (mod 5) numbers.
So, since there is a pattern, there must be some math wizardry. Turns out there are two interesting things here. The first is using combinatrics, which I know nothing about, but I can at least give the equation:
The fascinating part is that this is the expansion for finding the combinations of 1, 2, and 5 cents, which maps to [1, 5, 10, 25].
I was thinking along something like this. I figured there was some way to use GCD to minimize the work here but this is one gap in my knowledge.
This next one will blow your brain, but unfortunately, I don't know how to do this stuff either.
So, basically, find all the GCDs and compute that set of numbers to find the expansion of the larger set via the bijection rule. Push around the bits to print all permutations if you really want to, and..?