We prove that if G is a 2-connected graph with minimum degree at least k⩾4, then (1) G contains k cycles whose lengths form an arithmetic progression with common difference one or two, unless G≅Kk+1 or Kk,n−k; (2) G contains cycles of lengths ℓ modulo k for all even ℓ, unless G≅Kk+1 or Kk,n−k; (3) G contains cycles of lengths ℓ modulo k for all ℓ, unless G≅Kk+1 or G is bipartite. In addition, we show that if k is even and G is 2-connected with minimum degree at least k−1 and order at least k+2, then G contains cycles of lengths ℓ modulo k for all even ℓ. As a corollary, we determine the maximum number of edges in a graph that does not contain a cycle of length divisible by k for all odd k.