  Let $G$ be a finite almost simple group. It is well known that $G$ can be
generated by 3 elements, and in previous work we showed that 6 generators
suffice for all maximal subgroups of $G$. In this paper we consider subgroups
at the next level of the subgroup lattice - the so-called second maximal
subgroups. We prove that with the possible exception of some families of rank 1
groups of Lie type, the number of generators of every second maximal subgroup
of $G$ is bounded by an absolute constant. We also show that such a bound holds
without any exceptions if and only if there are only finitely many primes $r$
for which there is a prime power $q$ such that $(q^r-1)/(q-1)$ is prime. The
latter statement is a formidable open problem in Number Theory. Applications to
random generation and polynomial growth are also given.
