Find the number of children, and seperatly the ratio of males to females, which ensures existance of genetic line and of one male and one female respectively the following generations

Imagine you can have an unlimited number of children, and can choose the gender of each one. Your genetic line will exist as long as at least one of your descendants is alive. In each generation, your children and descendants will produce offspring according to the following distribution:

Number of Offspring Probability
0 20%
1 32.4%
2 27.36%
3 12.56%
4 5.12%
5 1.7%
6 .64%
7 .21%



Assume all offspring are born at the same time in each generation, and that after producing offspring the previous generation will die. For each of the following generations, find the minimum number of initial children which ensures the genetic line will exist in that generation to 99%, 99.9%, and 99.99% certainty.

Separately, assume now that the probability a descendant will be male is 51.2%, and that there is an additional 6% chance a male will not produce offspring. For each of the following generations, find the minimum number of initial children and the optimal ratio of males to females which ensures not only that the genetic line will exist, but that there will be at least one male and one female in each generation up til and including that point to 99%, 99.9%, and 99.99% certainty.

A: 29

B: 286

C:2857