a) Prove that if $n$ is an odd perfect number then $n$ has the following form \[ n=p^sm^2 \]where $p$ is prime has form $4k+1$, $s$ is positive integers has form $4h+1$, and $m\in\mathbb{Z}^+$, $m$ is not divisible by $p$.
b) Find all $n\in\mathbb{Z}^+$, $n>1$ such that $n-1$ and $\frac{n(n+1)}{2}$ is perfect number
Let $n=\prod_{i=1}^{k}{p_i^{a_i}}$ be the canonical form of $n$. Since $n$ is odd, each $p_i$ is odd.
We've $2n=\prod_{i=1}^{k}{(1+p_i+p_i^2+...+p_i^{a_i})}$. Note that $\nu_2 (2n)=1$.
Since $1+p_i+p_i^2+...+p_i^{a_i} \equiv a_i+1\pmod{2}$, there exists at least one $j\in \{ 1,2,...,k\}$ that $a_j+1$ is even.
If there exists two distinct such $j$, we'll get $4\mid 2n$, contradiction with $\nu_2 (2n)=1$.
Hence, there exists exactly one $j\in \{ 1,2,...,k\}$ that $a_j$ is odd.
So, $a_i+1$ is odd for all $i\in \{ 1,2,...,k\}$ that $i\neq j$, this gives $n=p_j^{a_j}m^2$ for some $m\in \mathbb{Z}^+$.
If $p_j\equiv 3\pmod{4}$, we get $1+p_j+p_j^2+...+p_j^{a_j}\equiv \frac{3^{a_j+1}-1}{2}\pmod{4}$.
We've $2n\equiv 2 \pmod{4} \implies (1+p_j+p_j^2+...+p_j^{a_j})m^2\equiv 2\pmod{4}\implies m^2\equiv 1\pmod{4}$.
Not hard to see that there's no even number $u$ that $\frac{3^u-1}{2}\equiv 2\pmod{4}$, done.
Hence, $p_j\equiv 1\pmod{4}$, this implies $$n\equiv 1\pmod{4}\implies (1+p_j+p_j^2+...+p_j^{a_j})m^2\equiv 2\pmod{4}\implies 1+a_j\equiv 2\pmod{4}.$$Hence, $a_j\equiv 1\pmod{4}$, and this complete part a).
First, note that any even perfect number must be of the from $2^{n-1}(2^n-1)$ where $2^n-1$ is a prime number.
We've two possible cases depend on parity of $n$.
1. If $n$ is even, $n-1$ is odd, by a), we get that $n=p^am^2+1$ for some prime number $p$ and positive integers $a,m$ with $p,a\equiv 1\pmod{4}$. Note that $n\equiv 2\pmod{4}\implies \frac{n(n+1)}{2}\equiv 1\pmod{2}$.
So $\frac{n(n+1)}{2}=q^b\ell^2$ for some prime number $q$ and positive integers $b,\ell$ with $q,b\equiv 1\pmod{4}$.
Since $\gcd (\frac{n}{2} ,n+1)=1$, we get that one of $\frac{n}{2},n+1$ must be of the form $q^bk^2$ for some positive integer $k$.
We've $q^bk^2\equiv k^2\pmod{4}$ and it can't be even number, so $q^bk^2\equiv 1\pmod{4}$.
If $n+1=q^bk^2\equiv 1\pmod{4}$, we get $n\equiv 0\pmod{4}$, impossible.
So $\frac{n}{2}=q^bk^2\implies n+1=v^2=p^am^2+2$ for some positive integer $v$.
Consider the equation in modulo $4$ gives us the contradiction.
2. If $n$ is odd, $n-1$ is even, we get that $n-1=2^p(2^{p+1}-1)$ for some positive integer $p$ that $2^{p+1}-1$ is a prime number.
If $p\geq 2$, we've $n\equiv 1\pmod{4}\implies \frac{n(n+1)}{2}\equiv 1\pmod{2}$.
So $\frac{n(n+1)}{2}=q^b\ell^2$ for some prime number $q$ and positive integers $b,\ell$ with $q,b\equiv 1\pmod{4}$.
We've $(2^p(2^{p+1}-1)+1)(2^{p-1}(2^{p+1}-1)+1)=q^b\ell^2$.
So there exists $\epsilon \in \{ 0,1\}$ that $2^{p-\epsilon }(2^{p+1}-1)+1=v^2$ for some positive integer $v$.
So, $2^{p-\epsilon }(2^{p+1}-1)=(v-1)(v+1)$.
Recall that $2^{p+1}-1$ is prime number. We get that $2(2^{p+1}-1)$ divide one of $v-1,v+1$.
So, $v\geq 2(2^{p+1}-1)+1$, we easily arrive at the contradiction from $2^p(2^{p+1}-1)+1\geq v^2\geq (2(2^{p+1}-1)+1)^2$ when $p\geq 2$.
Hence, $p=1$, this gives $n=7$, easy to see that this works and so is the only solution to our problem.
ThE-dArK-lOrD wrote:
For $b)$
We have $n=m^2+1$ for some $m \in \mathbb{N}$
So we get that $\frac{(m^2+1)(m^2+2)}{2}=t^2$ for some $t \in \mathbb{N}$
So $(m^2+1)(m^2+2)=2t^2$
SInce $GCD(m^2+1,m^2+2)=1$
We have $2$ possible case
Case $1)$ $m^2+1=p^2$ and $m^2+2=2q^2$
Give $(m-p)(m+p)=1$ impossible in $\mathbb{N}$
Case $2)$ $m^2+1=2p^2$ and $m^2+2=q^2$
Give $(m-q)(m+q)=2$ also impossible in $\mathbb{N}$
How can you get $n=m^2+1$?
And $n=7$ is work