Starting from the second son, (multiple of 6 -2) * 1/7, (multiple of 6 -3) * 1/7, (multiple of 6 -4) * 1/7, (multiple of 6 -5) *1/.
(6 -6 multiple) * 1/7 If you can get an integer, it should be a multiple of 42, and there is a surplus, but you can't continue to distribute it according to the law, so you can get 6 sheep by (6 -5 multiple) * 1/7 for the penultimate son and (6 -6 multiple) for the last son.
So, push * * * six sons from back to front, and each one gets six sheep.
6*6=36, * * * There are 36 sheep.
There is no condition for the average distribution or sharing of sheep in this problem. Although the equation can also get the answer, the equation has no basis.