Deuteronomy 23:2

23:2 A person of illegitimate birth may not enter the assembly of the Lord; to the tenth generation no one related to him may do so.

Deuteronomy 23:8

23:8 Children of the third generation born to them may enter the assembly of the Lord.

Nehemiah 7:61

7:61 These are the ones who came up from Tel Melah, Tel Harsha, Kerub, Addon, and Immer (although they were unable to certify their family connection or their ancestry, as to whether they were really from Israel):