Given an elliptic curve E over a finite field F_q of q elements, we say that
an odd prime ell not dividing q is an Elkies prime for E if t_E^2 - 4q is a
square modulo ell, where t_E = q+1 - #E(F_q) and #E(F_q) is the number of
F_q-rational points on E; otherwise ell is called an Atkin prime. We show that
there are asymptotically the same number of Atkin and Elkies primes ell < L on
average over all curves E over F_q, provided that L >= (log q)^e for any fixed
e > 0 and a sufficiently large q. We use this result to design and analyse a
fast algorithm to generate random elliptic curves with #E(F_p) prime, where p
varies uniformly over primes in a given interval [x,2x].Comment: 17 pages, minor edit