Im going to say a 9mm. A 22 would be a good choice but id rather have a 9mm, It has more power so if you need it on larger pests then you have it. Ammo is not as cheap as a 22 but its not very expensive. I just got a 100 round pack of 9mm for $11.50.
Also i will recomend that if you do get a 9mm DO NOT ask for a bullet to shoot out of it for hunting bears.