6 batteries in series means 6x1.5=9 volts. Each LED needs at least 3 volts of forward voltage, so 3 leds in series will have low brightness. So you go for 3 leds per series. Each series needs 3.1x2 = 6.2 volts, so the resistor must drop 9-6.2=2.8V @ 20mA, R = 2.8/0.02 = 140 Ohms
So, you need 48 series of 2 leds each and one resistor of 140 Ohms (or 120 Ohms).... All of them connected in parallel.