Message Boards Message Boards

0
|
16587 Views
|
13 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Understanding result for prime factorization of 25

Posted 9 years ago

Input: "factor 25" (http://www.wolframalpha.com/input/?i=factor+25)

Incorrect result returned:

Incorrect prime factorization of 25

We should get 5^2

Using Mathematica we get the correct factorization Prime factorization of 25 using <strong>Mathematica

Why did Wolfram|Alpha return that result?

POSTED BY: Rodrigo Sambade
13 Replies

There is a bug insofar as W|A describes 25 as having two distinct prime factors. I'm fairly sure the difference in notation in results for "factor 25" vs. "factor 49", to wit, 5x5 vs. 7^2, stems from the underlying problem, that of deciding the two factors are unequal.

POSTED BY: Daniel Lichtblau

Hi everyone,

I am not sure whether I understand the question either, and I really like Daniel's comment, but it seems that there is still some confusion. Rodrigo refers to the parenthesis in the output of WolframAlpha rather than to the formula 5x5 or $7^2$.

enter image description here

and

enter image description here

It is curious that in the case of 25 the 5x5 are labelled as "2 distinct prime factors" whereas in the case of 49 the 7x7 is labelled as "2 prime factors, 1 distinct". If he does not refer to the actual formula put to the comment in the parenthesis he is sort of right that the two cases appear to be treated a little bit differently, is he not?

Cheers,

Marco

POSTED BY: Marco Thiel

Yes. I'm referring to the parenthesis in the output. Why does Wolfram|Alpha label both cases differently?

POSTED BY: Rodrigo Sambade

Hi Rodrigo,

I suppose that this is what Ilian meant. Mathematica and WolframAlpha actually factor both numbers 25 and 49 correctly. WolframAlpha's suggestion that 25 contains two distinct prime factors is indeed unexpected.

If you run

Table[WolframAlpha["factor " <> ToString[m^2], 
   IncludePods -> "PrimeFactorization", 
   AppearanceElements -> {"Pods"}, 
   TimeConstraint -> {30, Automatic, Automatic, Automatic}], {m, 2, 
   10}] // TableForm

which gives just the WolframAlpha output with the parenthesis, you see that $5^2$ behaves oddly:

enter image description here

Cheers,

Marco

POSTED BY: Marco Thiel

Mathematica factors 25 correctly, but Wolfram|Alpha doesn't. Extracting the Wolfram|Alpha result for the factorization of 25 with the Mathematica's Wolfram|Alpha API as "computable data", you get the following: Extract of the Wolfram|Alpha result for the prime factorization of 25 as computable data

Which, of course, is incorrect.

POSTED BY: Rodrigo Sambade

That is sort of what I said. It suggests that it is the product of 5 and 5, which s correct, but it identifies the fives as different which is not so.

Thanks for confirming.

Cheers,

Marco

POSTED BY: Marco Thiel

hello folks. I learnt that every natural number n can be written as p1^n1 * p2^n2 * p3^n3*...... p1, p2, p3,....being different primes and n1, n2, n3.... natural numbers = Element of {1, 2, 3, ....} . And this decomposition of n is unique, there is no other.

The result FactorInteger[x]-> {{a,b}} means X = a^b. So FactorInteger[25] -> {{5,2}} is perfectly correct as 5^2 = 25 and 5 is prime.

POSTED BY: Hans Dolhaine

Perhaps that 5 and 5 are not really distinct?

POSTED BY: Ilian Gachevski

I assume is telling that 5 and 5 are not equal factors. If you input "factor 49", the result tells that 7 and 7 are equal. http://www.wolframalpha.com/input/?i=factor+49.

Prime factorization of 49

The result for the prime factorization of 47 is correct, and the result for the prime factorization of 25 is incorrect.

POSTED BY: Rodrigo Sambade

I think it is a case of 5 and 5 being distinct for suitably different values of 5.

POSTED BY: Daniel Lichtblau

One definitly has to be careful about these things and distinguish between different instances of the same integer. Things get really hairy when one combines integers and transcendentals. There is a famous example in elementary particle physics where an expression has a factor of the form $\frac{1}{9-\pi ^2}$ and one has to be very careful taking the limit as $3\to \pi$. Screw that up and all hell breaks loose...

POSTED BY: David Reiss
Posted 9 years ago

Sorry -- what is wrong with the results above?

POSTED BY: David Keith

Try "factor 49". It returns 7^2, not 7 x 7. http://www.wolframalpha.com/input/?i=factor+49. So the same with "factor 25". It is saying "5×5 (2 distinct prime factors)". But 5 and 5 are equal, not distinct. Prime factorization of 49

Wolfram|Alpha factors correctly 49, but fails in the factorization of 25.

POSTED BY: Rodrigo Sambade
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract