I will start by reviewing the two types of representational sequences that occur abundantly in hippocampus (HPC) — theta sequences and sharp wave-ripple (SWR) sequences. Then I will present a novel systems-level, computational-level, and algorithmic-level model, in which HPC forms a key part of the brain-wide deliberative decision-making system; namely as part of a hierarchical planning system. In this model, prefrontal cortex (PFC) produces a high-level plan, and then consults with HPC in order to sequentially refine each step of the plan. I formalize the computational task of HPC as an optimal control problem, and find specific roles for theta sequences and SWR sequences in solving the two-point boundary value problem which emerges from Pontryagin's maximum principle. This model has the potential to explain in a unified manner a vast array of disparate results, ranging from the effects of learning and of reward-contingency manipulations on HPC sequences, to an assortment of lesion studies in HPC and PFC, to the role of HPC in enabling flexible behavior.