   Length of factored numbers.
  Hi, I just had a quick question about factoring numbers.  If you''ve got a number of arbitrary length that you want to factor into two numbers, is there a way to determine the minimum and maximum number of digits that the factors will have?  Any hints, links or suggestions would be appreciated, thanks in advance.she  
  Well one of them will have atleast 1 digit and equal to or less than the number of digits in sqrt(n). Or something like that. ;  Well, you''ll first need to know if a number is prime or not.If it''s prime, it has only two factors: 1 and itself.If it''s not prime, it has some number of factors.And we all know how EASY it is to test that for an arbitrarynumber, don''t we?   Kami no Itte ga ore ni zettai naru! ;  Your inquiry is quite vague, not knowing exactly what heuristic you're using to determine the factors, or possibly what the original number might be.  Using what tangentz said, if the number is prime, the minimum number of digits is 1 and the maximum number of digits is [[ log10n + 1 ]].  But then again, a number doesn't have to be prime to have factors of 1 and itself, so that applies to any number.  That probably doesn't help you though.More information is needed.   [edited by - Zipster on February 15, 2004 12:58:52 AM];  so what are the min and the max values of the factors? 2 and N/2 ;  Well, it's easy to get halfway to the answer:The maximum number of digits is <= ceil(log10n0.5). The minimum number of digits is obviously 1.   [edited by - Mayrel on February 18, 2004 3:17:28 PM];quote:Original post by sjelkjd  so what are the min and the max values of the factors? 2 and N/2   The minimum factor is 1 and the maximum factor is N.You probably mean "what''s the maximum factor of N that isn''t N?" It is, quite obviously, rather difficult to determine that, otherwise we could easily test for primeness by checking to see if maximum-factor-not-N is 1.Similarly, if it was easy to determine "what''s the minimum factor that isn''t 1?", then we could test primeness by checking if minimum-factor-not-1 was N. ;  Thanks for the replies everyone, guess it''s not as easy as I was hoping. 