Genesis 50:23

And Joseph saw Ephraim’s children of the third generation: the children also of Machir the son of Manasseh were brought up upon Joseph’s knees.

Joseph lived to an advanced age in Egypt, his life extending long after his elevation and settlement there. In those later years he saw the descendants of his son Ephraim continue through the third generation. The children of Machir, who belonged to the line of Manasseh his other son, were brought up upon his knees in a sign of close affection and acknowledged kinship. Together these details record both the multiplication of his family and the length of his sojourn in Egypt.