An overwhelming 83 percent of Americans say that God answers prayers–which begs the question, does prayer work? Is it something that we can even begin to approach scientifically? Unsettling as these questions may be, I [Cara Santa Maria] think it’s important to attempt to get to the bottom of them.
For help, I reached out to two researchers,Tanya Marie Luhrmann, an anthropologist at Stanford and author of the book “When God Talks Back” and Michael Shermer, executive director of the Skeptics Society and author of “The Believing Brain.”

I think there’s much about neurology we don’t understand but this seems about right
If you want a more mathematical approach :-
Ancient Discoveries ‘Computer’ – National Geographic. or :-
‘The History of Mathematics’ – a series of 3 programmes I think by the BBC. again with the excellent Professor Jim Al-Khalili.