We initiate the mathematical study of the Bistritzer-MacDonald Hamiltonian for twisted trilayer graphene in the chiral limit (and beyond). We develop a spectral theoretic approach to investigate the presence of flat bands under specific magic parameters. This allows us to derive trace formulae that show that the tunneling parameters that lead to flat bands are nowhere continuous as functions of the twisting angles.