Yeah, there is. Along these lines, you can define two functions on the positive integers:
f(n) = the sum of the divisors of n, or
g(n) = the sum of the proper divisors of n.
Then n is perfect if and only if f(n)=2n if and only if g(n)=n.
But f behaves more nicely than g, so I think it’s easier to work with f. In particular, f is multiplicative, while g is not.
(Multiplicative meaning f(mn)=f(m)f(n), when m and n are relatively prime).
For example:
f(42) = 1+2+3+6+7+14+21+42 = 96
f(6)*f(7) = (1+2+3+6)(1+7) = 96 also.
But:
g(42) = 54, while
g(6)*g(7) = (1+2+3)(1) = 6.
It’s also easier to define such things as superperfect numbers in terms of f.
n is superperfect if and only if f(f(n)) = 2n. 16 is superperfect since
f(f(16)) = f(31) = 32.
Finally, let’s throw in a couple more functions:
phi(n) = the number of positive integers less than n that are relatively prime to n (Euler Phi-function, or Euler totient function).
h(n) = the number of positive divisors of n.
There’s a connection among all three of these functions (f, phi, and h). I couldn’t find it on the net, so I’m going from memory here, but I think the connection is:
f(n) = SUM [h(d)phi(n/d)]
where the sum runs over all d such that d is a positive divisor of n.