For factoring a positive integer n into primes. Four variants of the elemen
tary algorithm are analysed. The worst-case time complexities vary from The
ta(rootn) up to Theta(rootn/log n). The average time complexities vary from
Theta(rootn) up to Theta(rootn/log(2) n).