I knew many mathematicians who fit into the latter category, but they are not religious like most people on this board, they are culturally religious.As an anecdotal example, I had one mathematics professor who was a Mormon, one of the most strict and literal of religions.