For every boy a mother gives birth to, it increases the chance of him being gay by like 20%.
So the 4th boy in a direct line of boys has like a 75% chance of being gay; the mother starts developing an immunity to testosterone during her pregnancies so by the 4th boy it basically comes out a girl.
Something like that. There's a study somewhere. Having a girl in between boys messes up the sequence.