ספר המדות, Children / Part I Children / Part I · מא
Sefer HaMiddot 250
מא. מִי שֶׁבָּא עַל הַכּוּתִית אוֹ זָכָר, אוֹ הִרְהֵר בַּעֲבוֹדָה זָרָה, לא יִהְיֶה לוֹ בֵּן תַּלְמִיד־חָכָם, וְאִם יִלְמַד בְּנוֹ תּוֹרָה יִהְיֶה שַׁכְחָן.
41. Someone who had sexual relations with a Kutaite woman (this was a large group that converted to Judaism, but in reality kept serving idolatry) or a male, or had idolatrous contemplations, will not have a son who is a Torah scholar, and if his son does learn Torah, he will be forgetful.