We present an analytical solution and numerical tests of the epidemic-type aftershock (ETAS) model for aftershocks, which describes foreshocks, aftershocks, and main shocks on the same footing. In this model, each earthquake of magnitude m triggers aftershocks with a rate proportional to 10αm. The occurrence rate of direct aftershocks triggered by a single main shock decreases with the time from the main shock according to the local modified Omori law K/(t + c)p with p = 1 + θ. Contrary to the usual definition, the ETAS model does not impose an aftershock to have a magnitude smaller than the main shock. Starting with a main shock at time t = 0 that triggers aftershocks according to the local Omori law, which in turn trigger their own aftershocks and so on, we study the seismicity rate of the global aftershock sequence composed of all the secondary and subsequent aftershock sequences. The effective branching parameter n, defined as the mean aftershock number triggered per event, controls the transition between a subcritical regime n 1. A characteristic time t*, function of all the ETAS parameters, marks the transition from the early time behavior to the large time behavior. In the subcritical regime, we recover and document the crossover from an Omori exponent 1 - θ for t t* found previously in the work of Sornette and Sornette for a special case of the ETAS model. In the supercritical regime n > 1 and θ > 0, we find a novel transition from an Omori decay law with exponent 1 - θ for t t*. The case θ < 0 yields an infinite n-value. In this case, we find another characteristic time τ controlling the crossover from an Omori law with exponent 1 - |θ| for t < τ, similar to the local law, to an exponential increase at large times. These results can rationalize many of the stylized facts reported for aftershock and foreshock sequences, such as (1) the suggestion that a small p-value may be a precursor of a large earthquake, (2) the relative seismic quiescence sometimes observed before large aftershocks, (3) the positive correlation between b and p values, (4) the observation that great earthquakes are sometimes preceded by a decrease of b-value, and (5) the acceleration of the seismicity preceding great earthquakes. |