microcontroller programming
The easiest way is to multiplex the LEDs - there's an schematic on this page. It's really easy:


Basically you light one bank at a time. Switching at 20+ Hz, the eye won't notice. Then you can program them to light in whichever way you wish.