Kharijah bin Zayd narrates from his father (may Allah be pleased with him) that the inheritance of the grandfather is this: he does not inherit anything along with the father; with a male child and with a son's son he is entitled to a sixth; and apart from that, as long as the deceased does not leave a paternal half-brother or half-sister, the grandfather takes the father's place. The shares of those entitled to fixed shares are given first; then, if the remaining property is more than a sixth, it is given to the grandfather, and if it is not more than a sixth, a sixth is given to the grandfather.
(40) Chapter: The severity regarding speaking without ijtihad on the issue of the grandfather with full brothers and paternal half-brothers, and the disagreement about it
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الفرائض / 12410