This is a room/encounter I ran twice recently, which may prove useful to someone sometime. It is a puzzle room, based on the mathematical puzzle known as The Josephus Problem.
The room is accessed through a secret/illusionary entrance in a cliff wall.
The adventurers find themselves in a magically dark tunnel and must fumble forwards. Suddenly they emerge into a circular room. Looking back they find there is no door behind them only solid rock.
In the centre of the room a lever stands up from the floor. When the party have settled for a moment a ghostly figure materializes out of the rock to their left. It is a large stone statue of a warrior. It moves to the lever and pushes it in the direction away from which the characters have entered. Immediately eleven stone chairs materialize from the walls in a circle. In each chair sits an identical warrior. The chairs all bear a number engraved high on their backs, visible to all in the room. One to eleven in this case. The ghostly warrior moves to the top chair, number one. As he approaches the occupant disappears. He does not sit down but instead walks clockwise around the room. As he approaches each chair the occupant disappears and then reappears when he has gone past. When he reaches chair number seven, he sits down. Then starting at the first warrior, each in turn kills the warrior to his left until there is only one warrior left intact. So the warrior in chair one reaches out with a giant stone sword and smashes the occupant of chair number two to pieces. The the occupant of three smashes number four. Five smashes six. Seven smashes eight. Nine smashes ten. Eleven then smashes number one. Three kills five. Seven kills nine. Eleven kills three and finally seven kills eleven. So our ghostly warrior wins. He starts to glow and stands up. He then walks through the solid wall on the opposite side of the room and is gone. The lever automatically rights itself back to the centre and all the chairs and remains of the warriors disappear.
After a short time the warrior returns through the wall. This time he pushes the lever towards the original entrance. Now twenty-one chairs appear and he behaves as before. This time he sits in chair number eleven and once the game finishes he is the survivor. He now stands up and walks out. The room resets and it should be clear what the players must do in order to continue in, or in fact get back out.
But when someone pushes the lever a large random number of chairs appear. I suggest d100 chairs. Or a d6 x 10 + 1d10, something like that. The trick is to figure out which one is the lucky seat. There are of course some fail safes built in. The occupants of the chairs will only make way for the person who pushed the lever. Once they sit down they start to feel heavy and in fact to their companions they take on the look of one of the stone warriors. It would take a strength check to get out of the chair during the game and the winning warrior will immediately attack that one person. Only the single occupant of the winning chair may go through the appropriate door. To everyone else it is solid rock.
Obviously you can add more restrictions as befits the deviousness of your players, or not.
What you use as the warriors should be appropriate to the party. In one case I used reskinned gargoyles and in the other reskinned earth elementals.
The puzzle is simple enough that it can be figured out. The trouble is, with high numbers it is easy to make a mistake and sit in the wrong seat.
My players got very nervous when I drew out the chairs and made the player place their mini on the chosen one. Then you play it out. Smash, smash, smash.
To be extra nasty, I found that those best at calculating tended to go first. Once they are out of the room, you can ask them not to help the next person, because after all they are no longer there.