Cototient characterization of even perfect numbers

An even number is perfect if, and only if, its cototient is the square of the highest power of 2 contained in it.
Details:
For even n, call the highest power of 2 that divides n bouba(n), and call n/bouba(n) kiki(n). (Saying that a number is ‘totally kiki’ (or, ‘purely kiki’) is just a picturesque way of saying that it is odd.)
Theorem. If n is an even number, then n is perfect fif the cototient of n is (bouba(n))^2.
Proof:
First, we address the ‘only if’ portion.
Suppose that n is an even number. Let bouba(n) = 2^(w – 1), where w > 1.
If n is perfect, then 2^w – 1 is prime and:
cototient of n = n – phi(n) = bouba(n)*kiki(n) – phi((bouba(n)*kiki(n))
= bouba(n)*kiki(n) – phi(bouba(n))*phi(kiki(n))
= (2^(w-1))*(2^w-1) – phi(2^(w-1)*phi(2^w-1)
= (2^(w-1))*(2^w-1) – 2^(w-2)*phi(2^w-1)
= (2^(w-1))*(2^w-1) – 2^(w-2)*(2^w-2) good
= 2^(2w-1) – 2^(w-1) – 2^(2w-2) + 2^(w-1)
= 2^(2w-1) – 2^(2w-2) – 2^(w-1) + 2^(w-1)
= 2^(2w-2)
= (2^(w-1))*(2^(w-1))
= (2^(w-1))^2
= (bouba(n))^2
Now we address the ‘if’ portion.
Suppose that the cototient of n is (bouba(n))^2.
Then:
cototient of n is (bouba(n))^2
implies
bouba(n)*kiki(n) – phi(bouba(n)*kiki(n)) = (bouba(n))^2
implies
(2^(w-1))*kiki(n) – phi((2^(w-1))*kiki(n)) = (2^(w-1))^2
implies
(2^(w-1))*kiki(n) – phi(2^(w-1))*phi(kiki(n)) = (2^(w-1))^2.
implies
(2^(w-1))*kiki(n) – 2^(w-2)*phi(kiki(n)) = 2^(2w – 2)
implies
2*kiki(n) – phi(kiki(n)) = 2^w
implies
phi(kiki(n)) – 2*kiki(n) = -2^w
implies
phi(kiki(n)) = 2*kiki(n) – 2^w
implies
phi(kiki(n))/2 = kiki(n) – 2^(w-1)
implies
kiki(n) is a power of an odd prime, p (because the RHS is odd, and therefore the LHS must also be odd, but if kiki(n) has more than one prime factor, then 4 is a divisor of phi(kiki(n)), and so the LHS would be even)
implies
kiki(n) = p (because if there exists a k > 1 such that kiki(n) = p^k, then phi(kiki(n)) = phi(p^k) = (p^(k-1))(p-1), and therefore (p^(k-1))*(p-1)/2 = p^k – 2^(w-1), and therefore (p^(k-1))*(p-1) = 2*p^k – 2^w, and therefore p^k – p^(k-1) = 2*p^k – 2^w and therefore -p^(k-1) = p^k – 2^w, and therefore 2^w = p^k – p^(k-1) and therefore p^k – p^(k-1) = 2^w, and therefore p*(p^(k-1) – p^(k-2)) = 2^w and therefore p is a divisor of 2^w and therefore an odd number > 1 is a divisor of a power of 2, a contradiction)
implies
(p-1)/2 = p – 2^(w-1)
implies
p – 1 = 2p – 2^w
implies
p = 2^w – 1
implies
n = (2^(w-1)*(2^w-1), where 2^w-1 is a prime
implies
n is perfect QED
notation: ‘fif’ means ‘if, and only if,’.
keywords:
[Mathematics]
[Number Theory]