For the past few months my Mazda 6 would sometimes not want to start. All the lights turn on, the radio comes on, A/C, everything, but there is no sound from the engine compartment. The first few times this happened I simply could roll the car back and forth a small amount while it was still in park and then turn the key and it would start right up. 2 weeks ago that stopped working and I had to get out and push the car back and forth pretty significantly to get it to start up, but once again it started very smoothly.
Things got much worse a couple day ago when it took me 15 minutes to start the car. Rolling the car back and forth didn't work, putting it in neutral and rolling it a bit more, then putting it back in park, didn't help. I eventually used a tool to hit on the starter and transmission from under the hood, and then the car started up.
I was hoping to get my car into the dealership this weekend, but instead I am having the problem again and nothing seems to be working.

There is no sound when I turn the key, all the electronics seem to be working, there is minimal corrosion on the battery and terminals, the car will NOT start in neutral, and this problem doesn't exist every time I try and start the car, what problems should I be looking at?

Thank you for your time!