Attempt to get a characterization of even perfect numbers from an equation involving the Dedekind psi function In this post we denote the Dedekind psi function as $\psi(n)$ for integers $n\geq 1$. This is an important arithmetic fuction in several subjects of mathematics. As reference I add the Wikipedia Dedekind psi function.
An even perfect number is an even integer $n\geq 1$ satisfying that $\sigma(n)=2n$, where $\sigma(n)=\sum_{1\leq d\mid n}d$ is the sum of divisors function.
Claim. Invoking Euclid–Euler theorem it is easy to prove that each even perfect number satisfies
$$4\psi(n)^2-(12n+3)\psi(n)=-9n^2,\tag{1}$$
alternatively $$\psi(n)=\frac{12n+3+3\sqrt{1+8n}}{8}.\tag{2}$$

Question. I would like to know if it is possible to get a characterization for even perfect numbers from $(1)$: what I evoke is if we can to prove that if an integer $n\geq 1$ satisfies $(1)$ then $n$ is an even perfect number. Many thanks.

The case $n=1$ is easy. By contradiction also is easy to rule out/discard that $n$ is a power of two and that $n$ is odd. Thus the only discussion is what happens with numbers of the form $$n=2^{\alpha}m\tag{3}$$
where $\alpha\geq 1$ is integer and $(2,m)=1$ for integers $m>1$.
Our case $(3)$ leads to
$$2^{\alpha+1}m\prod_{\substack{\text{primes }p\\p\mid m}}(p+1)^2-(2^{\alpha+2}m+1)\prod_{\substack{\text{primes }p\\p\mid m}}p(p+1)=2^{\alpha+1}m \prod_{\substack{\text{primes }p\\p\mid m}}p^2,\tag{4}$$
and if I was right from $(4)$ on assumption that $m=p$ is a prime (that is we assume that the number of distinct primes dividing $m$ is $\omega(m)=1$) I get that $p+1=\lambda 2^{\alpha+1}$ with $\lambda=1$ using the congruence $\prod_{\substack{\text{primes }p\\p\mid m}}(p+1)\equiv 0\text{ mod }2^{\alpha+1}$.
Thus if my argument works I need to rule out/discard the case of integers $m$ with more than $1$ distinct primes factors in their prime factorization (I want to remove the case $\omega(m)>1$).
 A: If a positive integer $n$ satisfies
$$4\psi(n)^2-(12n+3)\psi(n)+9n^2=0\tag1$$ then $n$ is an even perfect number.
Proof :
Solving $(1)$ for $\psi(n)$ gives
$$\psi(n)=\frac{12n+3\pm 3\sqrt{1+8n}}{8}$$
There has to be a positive integer $k$ such that $1+8n=k^2$, so
$$\psi\bigg(\frac{k^2-1}{8}\bigg)=\frac{12\cdot\frac{k^2-1}{8}+3\pm 3k}{8}=\frac 3{16}(k\pm 1)^2$$
Since $k$ has to be odd, there has to be a positive integer $m$ such that $k=2m+1$ to have
$$\psi\bigg(\frac{m(m+1)}{2}\bigg)=\frac 3{4}\bigg(m+\frac{1\pm 1}{2}\bigg)^2$$
There has to be a positive integer $\ell$ such that $m+\dfrac{1\pm 1}{2}=2\ell$, so
$$\psi\bigg(\ell(2\ell\mp 1)\bigg)=3\ell^2$$
Since $\psi$ is the multiplicative function with $\gcd(\ell,2\ell\mp 1)=1$,
$$\psi(\ell)\psi(2\ell\mp 1)=3\ell^2$$
For $\ell=1$, this does not hold. Suppose here that $\ell\gt 1$ is odd. Then, LHS is even while RHS is odd, which is impossible. So, $\ell$ has to be even, and there has to be a positive integer $a,s$ ($s$ is odd) such that $\ell=2^as$, so
$$\psi(2^a)\psi(s)\psi(2^{a+1}s\mp 1))=3\cdot 2^{2a}s^2,$$
i.e.
$$3\cdot 2^{a-1}\psi(s)\psi(2^{a+1}s\mp 1)=3\cdot 2^{2a}s^2,$$
i.e.
$$\psi(s)\psi(2^{a+1}s\mp 1)=2^{a+1}s^2$$
Suppose here that there are $a,s$ such that $\psi(s)\psi(2^{a+1}s+1)=2^{a+1}s^2$. Then, LHS is larger than RHS, which is impossible.
So, we have to have
$$\psi(s)\psi(2^{a+1}s-1)=2^{a+1}s^2$$
Let $\displaystyle 2^{a+1}s-1=\prod_{i=1}^{N} p_i^{b_i}$ where $p_i$ are distinct primes and $b_i$ are positive integers. Then, $$\psi(s)\prod_{i=1}^{N} p_i^{b_i-1}(p_i+1)=\bigg(1+\prod_{i=1}^{N} p_i^{b_i}\bigg)s$$Since RHS is not divisible by any $p_i$, we have to have $b_i=1$ for which we have $$\psi(s)\prod_{i=1}^{N} (p_i+1)=\bigg(1+\prod_{i=1}^{N} p_i\bigg)s$$Suppose here that $N\geqslant 2$. Then, LHS is larger than RHS, which is impossible. Therefore, $N=1$ implies $\psi(s)=s$, i.e. $s=1$. So, $n$ has to be of the form $n=2^a(2^{a+1}-1)$ where $2^{a+1}-1$ is prime. This means that $n$ has to be an even perfect number. $\quad\blacksquare$
