Yeah, I had problems with this as well. I'll give you two hints and then the answer so you can decide how much you want to do yourself =)
... First hint, the answer is not in the room with the singing octopus.
... Second hint, you're on the right track with the lamp
... And here's what you do - go into the main "room" of the whale, the one you enter, and light the lamps in the order specified by the octopus' song