A shift register IC can toggle the sequence of your lights 1 thrugh 5, or say, 12, 23, 34, 45. but if you wanted it for a staircase it'd get too complicated for me.
I'm guessing you'd have to have a data structure that'd know if you were going up or down and have memory for each floor?