I posted a solution to the puzzle as separate reply to the above comment. Mild SPOILERS: It gives you a different ending, but you can't go through the locked door, as far as I can tell. It's possible that there could be another solution that could unlock the door, but I'm not aware of one.