as a bit of visualization for my approach
in case I: you take a number from 1-5 twice, so I put the 2 numbers as seperate axes
the squares show how many times the number is the highest
you can see that the occurrences of number N are N
squared minus (N-1)
squared
aka: n^2 - (n-1)^2
same in case III where I put it as 3 axes and the occurrences of N are N
cubed minus (N-1)
cubed
aka: n^3 - (n-1)^3
case II is where I multiplied the occurrences of case I by the weight of the number
obviously I can't visualize the same for case III as it would be a 4d shape
at this point I've done n(n^2-(n-1)^2) for case II
so I did a summation for all the numbers N to get the sum of all amounts
with that sum I now have to divide it by the amount of combinations, which is just the size of case I
I tried "re-ordering the blocks" so they'd fit neatly inside eachother, but that doesn't seem to have a simple way (pretty obvious since the averages are decimal numbers)
for the latest rewritten formula I approached it like this:
take case I, make it one dimension greater, so it's [the highest number]^3, then subtract the sum of the smaller numbers squared (*1 to make it little cubes, but that's redundant)
so... summarized
average is ( [the highest number] to the power of ([amount of times you take a number] + 1) minus the sum of [all smaller numbers] to the power of [amount of times you take a number] ) divided by [the highest number] to the power of [amount of times you take a number]
average = ( [k] ^ ([m]+1) - sigma [from n=0 to n = k-1] of n ^ [m]) / k^m
also to be written as
...
no idea if that helps, just having fun
you can see my steps, maybe go a different route