There seem to be 3 (maybe 4) separate questions here:
Sometimes I think, for example, that a mathematician cannot be religious. I mean, the idea of belief in a God is very antiquated and not coherent for a scientist like a mathematician.
As Frank pointed out, math and science aren't the same thing (from a philosophical point of view). Science is about empirical facts, while math is about relations of ideas. If anything a "pure" mathematician would be more inclined to rationalism, mathematical realism and Platonism than a physicist or a biologist. And from there, the leap to theism is much easier than it would be for an empiricist.
And this makes me curious because it let me believe that religion and science have really something in common – but I can't explain what.
There are many answers to this, but I would point to Quine's "Two Dogma's of Empiricism", where he states his belief that physics and Greek Mythology are just different degrees of the same thing.
To illustrate Quine's point: An ancient Greek would say that the sun is pushed through the sky by Apollo. Newton says the sun's movement is due to gravity. Both are using invisible metaphysical entities (Apollo, gravity) to explain the movement of the sun. It is not that gravity is a different kind of explanation than Apollo, only that it does a better job at predicting the sun's movement.
If one wanted to avoid metaphysics and use only observable facts, then they have to avoid any invisible or abstract concepts and use only pure observation to describe the sun's movement. Quine claims (and most agree with him) that this is impossible, there will always be theoretical presuppositions and unobservable entities necessary for any useful scientific theory. See this post for more details.
Note that Quine himself was an atheist, so it wan't like he was trying to save religion or anything. On the contrary, he arrived at that conclusion after pondering the empiricist's efforts to separate science from metaphysics and realized that
I think, a scientist should accept only logical statements and the point of view of an atheist is more logical than others, I believe.
Logic can't prove or disprove religion, see this post for details. Per Quine's above mentioned results, as well as others such as Kuhn, theories (including religious views) can always be reconciled with facts, if one is willing to add additional assumptions. The claim that atheism is more logical (using the strict definition of logic) than belief is fallacious.
The reason that people interpret science as being in conflict with, and more logical than, religion is that in practice science has produced more results than religion (As Chris Sunami pointed out). Even most devout believers will go to their doctor not their priest when they have a serious disease. Quine argues that it is this pragmatic consideration which justifies atheism and materialism, not any logical considerations.
Others have argued that religion and science aren't contradictory. See this lecture by Rorty
What do you think?
As an atheist who is sympathetic to religious faith, I find that defenders of religions spend far too much time on the "science vs religion question", and not enough time trying to resolve the much bigger issue (to me) of religious pluralism. Most of the problems and bloodshed that come from religion seem to be about inter-religious conflict, not disputes between believers and scientists. I truly wish the Rortys, Plantinguas and Tariq Ramadans of the world would stop trying to defend faith from science and instead focus and defending faith from faith itself.