Based on a chat message
Given an input number
n > 9, construct its reverse, ignoring leading zeros. Then, construct a list of all prime factors that the number and its reverse don't have in common. Multiply those factors together to create the Uncommon Factor Number of the input.
Or, to put it another way: if
rev(n) denotes the decimal reversal of integer
n, calculate the product of
rev(n) divided by the square of the
Output that number.
2244 reverses to
4422. The prime factors of the first are
[2, 2, 3, 11, 17] and the prime factors of the reverse are
[2, 3, 11, 67]. The numbers not in common multiplicities are
[2, 17, 67], so
2278 is the output.
For another example,
1234 reverses to
4321. The product is
5332114 and the GCD is
1, so the output is
Obviously a palindromic number will have all its factors in common with its reverse, so in such a case the output is
n*n/n^2). Obviously, it's also possible for the output to be the multiplication all factors (i.e., the gcd is 1 -- the input and its reverse are co-prime), as in the case of the
- The input and output can be assumed to fit in your language's native integer type.
- The input and output can be given in any convenient format.
- Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
- If possible, please include a link to an online testing environment so other people can try out your code!
- Standard loopholes are forbidden.
- This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.
in out 17 1207 208 41704 315 1995 23876 101222302