I'm looking for an alternative power source to illuminate several LEDs. I'm using a 9V battery to power between 12 and 20 3mm/20mA white LEDs. They are wired in series parallel, everything works fine but a 9V battery will only last approx 2 hours. I'm looking for a rechargeable option that would last 3-4 or 6 hours. Any suggestions?
9v batteries (commonly known as 'transistor radio' batteries) are inherently inefficient (and expensive) because you are essentially using a "stack" of six 1.5v cells in series to get 9v. The internal resistance of this stack is eating up a lot of your power. 9v batteries are (should only be) used when something in the device needs high voltage at low current.
Meanwhile, 20 x 20ma = 400ma or .4 amperes. This is too much big a continuous load on a 9v battery. I would guess that if you measured the temperature of your battery you'd see a substantial temperature rise, which is causing the battery to burn up much of it's potential energy as heat inside the battery itself.
Ideally you need an op-amp(s) to drive your LEDs. Remember that you need to drive LEDs with CURRENT, not VOLTAGE. If you can't use op-amps, then use a single 1.5v "D" cell with an appropriate size of current limiting resistor, and wire all of your LEDs in parallel. You'll still be burning up some of your power as heat in the resistor(s), but this heat will be dissipated outside the battery instead of inside the battery.
Lastly, if you really want to continue using expensive 9v batteries in your present series/parallel circuit, use several of them in parallel to keep the continuous current from each battery below about 50ma per battery (my best guess). Again, measure the temperature rise of the batteries. The batteries need to dissipate internal heat faster than they create heat.