Dave's nice answer suggests that the PNP switch (Q2) could drive a LED as well as the NPN switch (Q1, Q3, etc).
Thus, there are two different cascaded sections, alternating. Each transistor acts as a current source for the single LED that it's collector drives. The LED acts as a voltage reference for the following stage's current source. Stage 0 requires a larger resistor, since it is not driven by a transistor current source.
If you run this on a simulator it can work, because each transistor and each LED matches its mates, and everything runs at the same temperature. If you choose a resistor value very large, each stage LED current is less - somewhere down the cascade LED current is too small to turn on the next stage.
A resistor value too small is the better choice - stage gain is limited by the dynamic resistance of the LED...LED current reaches a limiting value...in this case about 11.7mA.
simulate this circuit – Schematic created using CircuitLab
The LED used here is RED. With about 11mA flowing through it, roughly 2V appears from anode to cathode. The transistor base-emitter junction drops that by about 0.67V to 1.33V. So resistor R2 has 1.33/100 amps flowing...most of this reaches Q1's collector, and most of that flows through LED D2.
A BLUE or WHITE LED would likely require a higher supply voltage to keep the transistors from saturating...you need a DC supply at least twice the LED's turn-on voltage.
If the switch SW1 is grounded, Q1's base is pulled low, and Q1 supplies no current to LED D2. So there is no base current available to Q2...this current source is off...and so on down the chain.
It is interesting to speculate about a very long chain. Suppose LED D1 is left open-circuit, rather than grounded with the switch. This LED might now act as a photo-detector. Its photo-current flows into Q1's base, and is amplified by Q1 into D2. Much further down the chain, accumulated current gain may be enough to visibly light up a LED. Thermally-generated "leakage" currents could act similarly.