How many generations before someone ceases to be considered Jewish?

Cultural anthropologists have spent no small amount of effort attempting to figure out why any particular group uses matrilineal vs patrilineal descent. Some work focuses on the influence of being primarily pastoral vs primarily agricultural. Pastoralists tend to be patrilineal and agriculturally predominant groups tend to be matrilineal. Given that variation among tribal cultures the simple explanation that one must know who the mama is, or limiting marrying out, seem untenable. The Israelites were however primarily agriculturalists.

Once again this aspect of identity has little to do with religion; it is about tribal identity, being a member of the tribe not just as a slang expression but in a very real sense.

“You can think and act like a gentile, until a gentile reminds you that you are a Jew.”

Old bitter saying.