Prove that set of all perfect numbers is primitive recursive

284 Views Asked by At

I have to prove that set of all perfect numbers is primitive recursive.
Consider the characteristic function of the set: $$ \chi(x)=\begin{cases} 1, & x \text{ is perfect number} \\ 0, & \text{else} \end{cases}$$ $$x \text{ is perfect number} \iff x=\sum_{k=1}^{x-1}k\cdot(k|x)$$
Last function is primitive recursive (as bounded sum, divisibility and multiplication are primitive recursive functions). Thus, the characteristic function of the set is primitive recursive function, so our set is primitive recursive.
Am I right?