# Numbers that are the sum of the squares of their prime factors

A number which is equal to the sum of the squares of its prime factors with multiplicity:

• $16=2^2+2^2+2^2+2^2$
• $27=3^2+3^2+3^2$

Are these the only two such numbers to exist?

There has to be an easy proof for this, but it seems to elude me.

Thanks

• There are no other solutions below $10^7$. – Lucian Jan 10 '15 at 15:48
• @individ: I am finding it very difficult to understand what you are trying to say. For example, what do you mean by "Then we will solve it and to know when decisions can be"??? I wrote the explicit numbers because they are the only ones for which the definition at the top of the question ("a number which is equal to the sum of the squares of its prime factors with multiplicity") obviously holds. – barak manos Jan 10 '15 at 18:18
• @individ: In addition to that, I think that the numbers actually make it easier to understand (rather than confusing as you suggest), and I believe that most users here will agree with me on that. If anything, then the mathematical notation itself would make it less intuitive for most people. I could have phrased in a pure mathematical notation (as Hagen von Eitzen did at the first comment here), but I did not see any advantage in doing it this way. If a question can be written in a simple concise manner while keeping it mathematically accurate, then there is no reason why it shouldn't be. – barak manos Jan 10 '15 at 18:19
• @Lucian: You are talking as if you had proved this thing. – TonyK Jan 11 '15 at 16:39
• @individ: Your comment is incomprehensible to me! Have you read the question all the way through? It's not very long. – TonyK Jan 11 '15 at 16:40

For a start one could investigate under which assumptions about the sizes of $n$ and real variables $x_k\geq2$ $\>(1\leq k\leq n)$ an equality $$\prod_{k=1}^n x_k=\sum_{k=1}^n x_k^2$$ is at all possible.
• Well, in order to "fit" into the question at hand, $x_k$ should be prime for every $1\leq{k}\leq{n}$ to begin with, right? Also, after thinking a little about @Lucian's comment, I have realized that it is not possible when $x_k$ is the same prime for all $1\leq{k}\leq{n}$ (i.e., the left side of your equation is a prime-power), except for the two cases already mentioned ($16$ and $27$). – barak manos Jan 11 '15 at 13:43
• Though I admit that I have not dedicated any thought as to the value of $n$ (the total number of primes in the prime-factorization of the input number), for which this may be possible. It works with $n=4$ in the case of $16$ and $n=3$ in the case of $27$, but I don't see any correlation between these two cases. – barak manos Jan 11 '15 at 13:47
Maple confirms that $$A$$ and $$B$$ are prime, and that $$N$$ is a solution to the question. $$N$$ has 179 digits.
$$N=45AB\\ A=(C^{107}+D^{107})/(C+D)\\ B=(C^{109}+D^{109})/(C+D)\\ C=(\sqrt{47}+\sqrt{43})/2\\ D=(\sqrt{47}-\sqrt{43})/2$$ The general solution to $$3^2+3^2+5^2+A^2+B^2=3×3×5×A×B$$ is a sequence with recursion $$a_{n+1}=45a_n-a_{n-1}$$ The basic equation is a quadratic in any of the prime factors. The roots of the quadratic add up to the product of the rest of the prime factors. That is an easy way to generate solutions to $$\sum x_i^2=\prod x_i$$, although the $$x_i$$ might not be prime.
The starting point for this solution was $$1,1,3,3,4$$. Replace $$4$$ by $$1×1×3×3-4=5$$, then alternately replace the first factor $$A$$ by $$B×3×3×5-A$$ and the second factor $$B$$ by $$A×3×3×5-B$$.
Another starting point might be $$1,1,1,2,2,2,3$$ but I haven't found a prime solution from that.