<s>[INST] 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
 [/INST] 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.
</s>