Let's say I have a number $n$ and I want to find the divisors of $n$, I can do that using Divisors[n]
. That will generate a list {...,...,...}
which are the divisors of $n$. Now the question: how can I test if the sum of two divisors of the number $n$ add up to a perfect square?
For example the number $n=6$ as the following divisors {1,2,3,6}
and we can notice that $1+3=2^2$ and $3+6=3^2$. So I want Mathematica to spit out two things:
- I want Mathematica to give
True
is there are two numbers in the divisors that add up to a perfect square; - And I want Mathematica to find the two numbers that add up to the perfect square.