Findind 3 factors for a integer number

94 Views Asked by At

As a background I'll explain what I'm trying to achieve and where's from. In Person of Interest, a TV series, one of the characters gets a phone number in the form of area code and phone number, like 555.123.4567. After trying to call that number he realizes that it's not a phone number but if you multiply the 3 numbers (555 x 123 x 4567) you get a large integer number. This numbers when formatted correctly (adding a dot and separating the number) it becomes a set of GPS coordinates. For examples, the result of the multiplication is 1012345612567890 you can format it as 10.123456, 12.567890 and those are your coordinates.

I've been trying to recreate these to give it to a course I am preparing, but after playing with different things (getting the prime factors, etc) I have no clue how to do this, or even if this is possible.

So, give an integer similar to the one above, is there any equation/algorithm I can follow to get 3 numbers in the form of a phone number (xxx.xxx.xxxx) that when multiplied together get the orignal integer?

Thank you for the help.