Simplifying index generation
Somewhat overly complex solution
Quicker value, based on forum discussion
Natural problem for for comprehensions