Desultory math again, and the results seemed so weird in my head that I worked it out in a spreadsheet.
I thought that if parents keep trying for a boy, it will result in a great surplus of girls (or vice versa). But I was wrong!
Let’s assume a spherical-cow society: all parent couples consist of people who are fertile together, all pregnancies go right, no intersex babies or even twins to complicate matters, each gender comprises exactly (not randomly) 50% of all babies born.
Let’s also assume that in this spherical-cow society every couple will have children until they have a girl and then stop.
I’ll look at a sample of 100 couples; if I need half of an odd number I’ll assign it to boy or girl alternately. [ETA: @PeteBleackley said that a sample of 128 would mean that I’d never need to worry about rounding, and of course he’s right, but I’d miss the girl with infinite older brothers.]
50 couples have a girl first and stop trying. 50 couples have a boy. Of those couples, 25 have another boy as their second child and 25 have a girl. Now we have 75 girls: 50 are only children and 25 have an older brother. We also have 75 boys: 25 with an older brother, 25 with a younger brother, 25 with a younger sister.
Note that every girl is, and will stay, the youngest in her family, and all only children are girls.
In the third round, we have only 25 couples having more children: 13 have a boy (and go on), 12 have a girl (and stop). We now have 88 boys and 87 girls. The next round, in which 6 boys and 7 girls are born to the 13 couples with three boys, makes the numbers equal again at 94.
Three more iterations give 100 boys and 99 girls, leaving one family with seven sons whose not-yet-born daughter will have a potentially infinite number of older brothers, poor girl.
If no couple has a preference and all of them have two children, the number of boys and girls stays the same! Except that there will be exactly 100 girls because the parents of the 100th girl aren’t having all those boys first. There are 25 BB families (50 boys), 25 BG families (25 boys and 25 girls), 25 GB families (ditto) and 25 GG families (50 girls).
And if every couple has a preference but half want girls and half want boys, the relative number of boys and girls stays the same too! Except that there’s likely to be a not-yet-born boy with an infinite number of older sisters and vice versa.
I think the mistake I made was not taking into account that half the children in each round are the preferred gender already, and their parents aren’t having any more. In other words, in my mind all girls had a potentially infinite number of older brothers.