I am currently studying a photography course, and I have run into a bit of difficulty with one of my projects in relation to combinatorics. I have a key rack and there are 39 hooks on this key rack. I understand that to get the amount of combinations that could be produced with 39 keys, I would have to do 39! , but I want to get the amount of combinations with 38, 37, 36... 1 key(s) on top of that. The problem is that for one key, it would obviously be 39, as there are 39 hooks that it could go on to make it a different combination, but for two, there are 39 different hooks (so logic would declare 78 permutations) but there are also the different positions that the keys could be in relation to each other, so this number no longer seems correct.
Any help would be much appreciated.