Veja em http://br.groups.yahoo.com/group/teoremalista/files/primality. pdf o artigo que mostra e como funciona o algoritmo.
PRIMES is in P Manindra Agrawal, Neeraj Kayal and Nitin Saxena Department of Computer Science & Engineering Indian Institute of Technology Kanpur Kanpur-208016, INDIA August 6, 2002 Abstract We present a deterministic polynomial-time algorithm that determines whether an input number n is prime or composite. "The problem of distinguishing prime numbers from composite numbers and of resolving the latter into their prime factors is known to be one of the most important and useful in arithmetic. It has engaged the industry and wisdom of ancient and modern geometers to such an extent that it would be super uous to discuss the problem at length... Further, the dignity of the science itself seems to require that every possible means be explored for the solution of a problem so elegant and so celebrated." - Karl Friedrich Gauss, Disquisitiones Arithmeticae, 1801 (translation from [Knu98]) --- UOL Eleições 2002 - Todos os lances da disputa política http://eleicoes.uol.com.br/ ========================================================================= Instruções para entrar na lista, sair da lista e usar a lista em http://www.mat.puc-rio.br/~nicolau/olimp/obm-l.html O administrador desta lista é <[EMAIL PROTECTED]> =========================================================================