My method actually gives 2**1.5 * 5 ** 1.5, which is the actual square root of 1000. Coming up with 25 or 40 is going to be ... interesting. I can do further research into the mathematics behind it, if you want. (Number Theory is a pet project of mine.)
Being right, does not endow the right to be rude; politeness costs nothing. Being unknowing, is not the same as being stupid. Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence. Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.
| [reply] [d/l] |
I can do further research into the mathematics behind it, if you want. (Number Theory is a pet project of mine.)
I'd be interested in any insights you have. I keep poking at number theory ideas, but I never get anywhere.
-QM
--
Quantum Mechanics: The dreams stuff is made of
| [reply] |
Here's the gist - you have a list of @prime_factors. You need to break them apart into two other lists, then multiply the values in each list together to get two numbers. The goal is to get the two numbers closest to one another. Those will be your factors closest to the square root.
However, it's not as easy as it seems. When working with 1000, I tried taking the largest root, then as many of the smallest roots to match it, and so forth ... and it worked. I get 5*5 and 2*2*2*5. But, if you work with 700, you get 7*5 and 2*2*5, which isn't right - you should get 2*2*7 and 5*5.
I think I'm going to leave the problem in your capable hands. You've got a roadmap - have fun! :-)
Being right, does not endow the right to be rude; politeness costs nothing. Being unknowing, is not the same as being stupid. Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence. Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.
| [reply] |