by Ricardo Fernández Serrata
Returns an array containing the VE seq. Supports custom initial (seed) and "padding" values for a richer set of sequences.
Thanks to Numberphile, I learned about this sequence and other Run Length Encoded sequences like Conway's Look And Say.
I've optimized the algorithm by using more memory to avoid searches.
I used an array instead of a dictionary for faster access. Since the indices grow linearly, the extra memory used by the array is slightly higher, equal, or even less than a dictionary
Rate and review within the app in the Community section.