Battery light flashing on

I have a 2002 Mazda Protege with 74K miles. For the last month the battery light has been flashing on and off, more on lately. When I first noticed the battery light flash on, I took the car to my mechanic and he couldn’t find anything wrong with it. Soon after my car wouldn’t start after I had it parked for about 10 minutes. It wouldn’t hold a jump, so I had it towed to a nearby auto mechanic and had the battery changed. Since the battery change the battery light has still been flashing on and off. Yesterday, after my car had been parked for about 1.5 hours, it wouldn’t start again. It made a click-click-click sound but would not start. My car was able to hold a jump this time and I drove it to my mechanic. Once again he was unable to find anything wrong with the car. Any ideas what might be wrong with my car?

If your battery (including the new battery) is repeatedly going dead, then I think it is only logical to look at the alternator and/or the drive belt that powers the alternator. Did either of these mechanics check the output of the alternator?

Also, the connections to and from the battery need to be clean and tight.