A symplectic integrator algorithm suitable for hierarchical triple systems is formulated and tested. The positions of the stars are followed in hierarchical Jacobi coordinates, whilst the planets are referenced purely to their primary. The algorithm is fast, accurate and easily generalized to incorporate collisions. There are five distinct cases – circumtriple orbits, circumbinary orbits and circumstellar orbits around each of the stars in the hierarchical triple – which require a different formulation of the symplectic integration algorithm.
As an application, a survey of the stability zones for planets in hierarchical triples is presented, with the case of a single planet orbiting the inner binary considered in detail. Fits to the inner and the outer edges of the stability zone are computed. Considering the hierarchical triple as two decoupled binary systems, the earlier work of Holman and Wiegert on binaries is shown to be applicable to triples, except in the cases of high eccentricities and close or massive stars. Application to triple stars with good data in the multiple star catalogue suggests that more than 50 per cent are unable to support circumbinary planets, as the stable zone is non-existent or very narrow.