Hacker News new | past | comments | ask | show | jobs | submit login

You got the same answer from factor and Wolfram alpha; where is the bug?



wa shows 76 prime factors, which is the not same as printing out a bunch of 2's and 5's


WolframAlpha lists the factors as 2^38 * 5^38, which is just a compact notation for 38 2s and 38 5s, totalling 76 factors. If you count the 2s and 5s in the output of factor, you get the same result of 38 each for a total of 76 factors.


100000000000000000000000000000000000000

== 10 ^ 38

== (2 * 5) ^ 38

== 2 ^ 38 * 5 ^ 38

== 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5

Are 2 and 5 not prime?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: