Continuous generalizations of the Fibonacci sequence satisfy ODEs that are formal analogues of the Friedmann equation describing spatially homogeneous and isotropic cosmology in general relativity. These analogies are presented, together with their Lagrangian and Hamiltonian formulations and with an invariant of the Fibonacci sequence.