It has been in the news recently that a simple blood test can now determine whether an embryo is male or female. What is interesting, though, is that the determination can be made at a mere six weeks into pregnancy with 99% accuracy.
I find this interesting, because precisely 40 days into pregnancy is a significant milestone in the Talmud. The Talmud states in Berachos 54A
היתה אשתו מעוברת ואומר יהי רצון שתלד אשתי זכר הרי זו תפלת שוא
"If one's wife is pregnant and he says let it be thy will that my wife bears a son, this is a prayer in vain.”
Yet this is qualified by the codifiers that one may pray up until the 40th day after conception: See the Tur in Orach Chaim 230.
The Mishna Berurah (Orach Chaim 230:1) explains that this is because until 40 days, the embryo is not “formed” yet.
The source for this observation might be the Talmud in Menachos 99B
ר' יוחנן ור' אלעזר דאמרי תרוייהו תורה ניתנה בארבעים ונשמה נוצרה בארבעים
“Rabbi Yochanan and Rabbi Elazar both say that Torah is given at 'forty', and the soul is formed at 'forty'.”
All in all, I find this more than coincidental.