The question I initially thought of that prompted this was "How many distinct integer-sided cuboids are there with a volume of $60^3$?".
A small example to clarify: There are $3$ integer-sided cuboids with a volume of $8$, namely $8\times 1\times 1$, $4\times 2\times 1$, $2\times 2\times 2$.
I realised that since the prime-factorisation of $60^3$ is
$60^3=(2^2\times 3\times 5)^3=2^6\times 3^3\times 5^3$
Then the problem is equivalent to "How many ways can we distribute $6$ identical objects (i.e. the $2$s), and $3$ identical objects of a different kind (i.e. the $3$s), and $3$ identical objects of a different kind again (i.e. the $5$s) into $3$ identical groups?"
For example, $60^3=(2^4\times 3)\times (2\times 5^2)\times (2\times 3^2\times 5)$ would be one possible cuboid.
Note that any of the $3$ identical groups are allowed to be empty (this would mean a side length of $1$ in the cuboid).
To put the problem another way, how many ways can we distribute the letters of the word "AAAAAABBBCCC" into $3$ identical groups?
I have actually come up with a solution, $475$, by a sort of recursive method that I devised. I have copied my solution below. It feels very long and involved, so I would like to know if there a quicker way that relies on more standard recursively-defined functions, and is more easily generalisable. I am aware that related problems can be solved using Sterling numbers of the second kind, for example, or Bell numbers. But I have not been able to find any example of a problem like this, where the objects are a mixture of identical and distinct (what should I call this? Categorised?) and the groups are identical.
Feel free NOT to read on, but here is my long-winded solution:
Firstly, how many ways are there to distribute the 6 2s across the 3 groups? We can enumerate them:
0,0,6
0,1,5
0,2,4
0,3,3
1,1,4
1,2,3
2,2,2
Total: 7 ways
Ok now how many ways are there to distribute the 3 3s?
0,0,3
0,1,2
1,1,1
Total: 3 ways
Does this mean that there are 7 x 3 = 21 ways to distribute the 6 2s and the 3 3s? No! Since, it matters which of the 7 distributions of 2s we combine with which of the 3 distributions of 3s.
The important feature of a distribution, for seeing how it combines with a set of possible distributions “overlaid” onto it, is which groups (if any) have been made distinguishable from each other by the first distribution. There are 3 possible patterns:
All groups indistinguishable (call this A)
Two groups indistinguishable, the other distinguishable (call this B)
All groups distinguishable (call this C)
Going back to the 7 possible distributions of 2s and labelling them A, B or C accordingly:
0,0,6 B
0,1,5 C
0,2,4 C
0,3,3 B
1,1,4 B
1,2,3 C
2,2,2 A
So overall we have 1 A, 3 Bs and 3 Cs. At this point we can create our own “algebra” and use an algebraic-style shorthand (bearing in mind that A, B and C don’t represent numbers but patterns):
A + 3B + 3C
And for the 3 3s, we have:
0,0,3 B
0,1,2 C
1,1,1 A
Making A + B + C
Similarly, for the 3 5s we would have A + B + C
Now, how do these all combine? First let’s consider overlaying the 3 possible distributions of 3s onto the 7 possible distributions of 2s. And let’s suppose that we overlay a C-distribution (all 3 containers distinguishable) onto another C-distribution. How many combined distributions does that give us? It gives us 3 x 2 x 1 = 6. And what are the patterns (A, B or C) for these distributions? They are all Cs. And so, in our homemade algebra, we can introduce a * symbol for overlaying distributions of given patterns, and say:
C * C = 6C
So, how many distributions do we get, and with what patterns, by overlaying the 1 C-distribution of 3s onto the 3 C-distributions of 2s?
C * 3C = 18C
Now we can go through a similar process for combining B with C, B with B etc.
Note that, since an A-pattern is equivalent to the blank slate we started with, “multiplying” by A has no effect:
A * C = C
A * B = B
A * A = A
Note also that this form of “multiplication” is commutative, i.e. B * C = C * B etc, since we’ll get the same number of combined distributions whichever distribution we “put there first”.
Some thought tells us that B * C = 3C, since if we begin with a C, there are 3 possible places to overlay the distinguishable container of the B.
And by similar sorts of reasoning, B * B = B + C
Now combining everything together,
(A + 3B + 3C) * (A + B + C) = (A * A) + (A * B) + (A * C) + 3(B * A) + 3(B * B) + 3(B * C) + 3(C * A) + 3(C * B) + 3(C * C)
(Interesting to note that the distributive rule for “multiplication” in this sense is valid, since we are combining every possible distribution of 2s with every possible distribution of 3s)
= A + B + C + 3B + 3(B + C) + 9C + 3C + 9C + 18C
= A + 7B + 43C
All that is left to do now is overlay the possible distributions of 5s:
(A + 7B + 43C) * (A + B + C)
= A + B + C + 7B + 43C + 7(B * B) + 50(B * C) + 43(C * C)
= A + B + C + 7B + 43C + 7B + 7C + 150C + 258C
= A + 15B + 459C
Making a total of 475 distinct cuboids.