Q: Formula with $\sigma(n)$ and $\phi(n)$ is not an integer if $n$ is not square-free The question 
Let $n$ be an integer, let $\sigma(n)$ be the sum-of-divisors function, and let $\phi(n)$ be Euler's totient function. Prove that $\frac{\phi(n)\sigma(n) + 1}{n}$ is an integer if $n$ is prime, and that $\frac{\phi(n)\sigma(n) + 1}{n}$ is not an integer if $n$ is divisible by the square of a prime. 
My attempt at a solution:
The first part is straightforward. If $n$ is prime, then $\sigma(n) = n + 1$ and $\phi(n) = n - 1$. 
So $$\frac{\phi(n)\sigma(n) + 1}{n} = \frac{(n-1)(n+1) + 1}{n} = \frac{n^2 - 1 + 1}{n} = \frac{n^2}{n} = n.$$ We know $n$ is an integer, so the first part is complete. 
Now for the second part. I'm confused as to where to start. The only thing I know about square-free numbers is the following: if $\phi(n) \mid n - 1$, then $n$ is square-free. How would I use this knowledge to reach a conclusion? 

A: We have $$
\sigma(p_1^{k_1}\cdot p_2^{k_2} \cdot \dots \cdot p_i^{k_i}) =  \frac{p_1^{k_1+1} - 1}{p_1 - 1} \cdot \dots \cdot \frac{p_i^{k_i+1} - 1}{p_i - 1}
$$ and
$$
\phi(p_1^{k_1}\cdot\dots\cdot p_i^{k_i}) = \prod_{h = 1}^{i}p_h^{k_h - 1}(p_h -1).
$$
The term for sigma is basically the sum formula for geometric series for every $p$.
With that given we get
$$
\frac{\sigma(p^k)\cdot\phi(p^k) + 1}{p^k} = \frac{(1 + p + p^2 + ... +p^k)p^{k-2}(p-1) + 1}{p^k}
$$
It's obvious that the numerator isn't divisible by $p$.
With the given formulas we get $\sigma(p_1^{k_1} \cdots p_i^{k_i}) = \sigma(p_1^{k_1})\cdots\sigma(p_i^{k_i}) $. The same goes for $\phi(n)$. Let $p_1^{k_1}$ with $k_1 \ge 2$ be a divisor of $n = p_1^{k_1}\cdots p_i^{k_i}$ and we get
$$
\frac{\sigma(p_1^{k_1})\cdot\phi(p_1^{k_1})\cdot\sigma(p_2^{k_2}\cdots p_i^{k_i})\cdot \phi(p_2^{k_2} \cdots p_i^{k_1}) + 1}{n}.
$$ 
As we proved before, $\sigma(p_1^{k_1})\cdot\phi(p_1^{k_1})$ is divisble by $p$. Out of this follows that $\sigma(p_1^2)\cdot\phi(p_1^2)\cdot\sigma(p_2^{k_2}\cdots p_i^{k_i})\cdot\phi(p_2^{k_2} \cdots p_i^{k_1}) $ is divisble by $p$ and with that given, the numerator cant be divisible by $p$ and this term can't be an integer. $\square$
I hope my English isn't too bad so your still able to understand it :) 

A: Let $n=p^a m$ where $p$ is prime and $a\geq 2$ and $m$ is an integer not divisible by $p$. We have $\sigma (n)=\sigma (m)(p^{a+1}-1)/(p-1) $ and $\phi (n)=\phi (m)p^{a-1}(p-1)$.Therefore $$1+\sigma (n)\phi (n)=1+\sigma (m)\phi (m) (p^{a+1}-1)p^{a-1} $$ which is congruent to $1$ mod $p$ because $a\geq 2$. So it is not divisible by $n$ because $p|n$.
