Suppose I wanted to define in first order logic a predicate of natural numbers, $perfect$, where $perfect(n)$ for $n \in \mathbb{N}$ iff $n$ is a perfect number (i.e, a positive integer that is equal to the sum of its proper divisors).
Could I definitionally introduce a sum operator to do this?
If variables ranged over sets (so we had something like first-order set theory), how would we do this? How could we define the sum operator in this language?