Lets say I have a number n = 3245 and I want to split the number in to all integer partition lengths like:- ( I may wish to extend this to numbers greater than 30 digits).
{3, 245}, {32, 45}, {324, 5}, {3, 2, 45}, {32, 4, 5}, {3, 2, 4, 5}.
I have devised a way to determine the partitions like so.
a = IntegerPartitions[4]; b = Reverse /@ a; c =
Select[Sort[Join[a, b]], Length[#] > 1 &] // DeleteDuplicates
{{1, 3}, {2, 2}, {3, 1}, {1, 1, 2}, {2, 1, 1}, {1, 1, 1, 1}}
However, I can’ t see how to map those partitions to the actual number, I have tried using strings but there doesn’ t seem to be a function to split a string by its position.
Any help or ideas would be appreciated.
Paul.