  Carnot groups are subRiemannian manifolds. As such they admit geodesic flows,
which are left-invariant Hamiltonian flows on their cotangent bundles. Some of
these flows are integrable. Some are not. The space of k-jets for real-valued
functions on the real line forms a Carnot group of dimension $k+2$. We show
that its geodesic flow is integrable and that its geodesics generalize Euler's
elastica, with the case $k=2$ corresponding to the elastica, as shown by
Sachkov and Ardentov.
