Beeping three times and won't turn on
I have a Mac Book Pro '13. I have experienced this problem 4 or 5 times. Unexpectedly, my computer will shut down either while I'm using it or while its asleep. Then, it will start making 3 beeping noises every 5 seconds. It will not turn on and just gives me a black screen. Every time this has happened to me I have fixed it but differently each time. I have pushed shift+control+option, many other key combinations, and simply by holding the power button for 10 seconds. It turns on after a good time diving into apple forums. I never lose anything on my computer. My computer thinks that it just restarted unexpectedly and asks to send a report to Apple. But, I do not believe that it just "restarted unexpectedly." Basically, I am wondering if there is any way I can prevent this from happening again. I've seen on online forums that I need to reinstall my software and that seems very drastic. Is there any way I can fix this without wiping my computer completely? Thanks!
MacBook Pro with Retina display, OS X Yosemite (10.10.3)