If you want to keep the ratio similar to stock you can go down to 39 on the rear to keep the LCM up (lowest common multiple). If that's rather low it means there is a lot of repitition in where the sprockets interface with the links on the chain, hence it will wear more quickly. If you want to go a bit furhter, go up to 41 on the rear, as that also yields a high LCM.
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." Albert Einstein
'85 GSX250S -> '96 ZX6R -> '98 ZX6R -> '00 ZX6R -> '03 CBR954RR -> '04 ZX10R -> '02 ZZR250 -> '06 ZX10R -> '08 KTM 990 ADV