Where the taxability of income under this chapter depends on the residence of the beneficiary and there are two or more beneficiaries of the trust, the income taxable under Section 17742 shall be apportioned according to the number and interest of beneficiaries resident in this state pursuant to rules and regulations prescribed by the Franchise Tax Board.