Run a loop pattern for a chosen n, light a cell each time its innermost line runs, then turn the count into a formula and the formula into a Big-O.
This interactive visualization needs JavaScript.