The question:
Let $n\in\Bbb N$ and let $p$ be a prime. Show that if $ p\mid n$ then $\phi(np)=p\phi(n)$.
What I know is:
It is related to Euler's totient function $\phi$
$\phi$($n$)= # of $+$ve integers that are less than n and are relatively prime
prime numbers$>=1$
$\phi$($p$)=$p-1$, where $p$ is a prime number
$ p\mid n$ means that $p$ divides $n$ such that $n=kp$, where $k\in\Bbb N$.
$\phi$($n$)= $\phi$($n$) because $p\mid$n and only $n$, so it can't divide the numbers that are not divided by $n$ itself, which are $ϕ$(n).
I don't know how to prove it as I don't understand how come $\phi$$(np)$=$p$$\phi$($n$)?
It comes with a hint which is to consider the prime factorization of $n$. (The one who gave me the question didn't declare the hint).
Since $p | n$, the prime factorization of n is
$n = $$p^e$$p^{e_1}_1$$p^{e_2}_2$$\cdots$$p^{e_k}_k$, for some $k$.
Thus
$ϕ(n) = ϕ($$p^e)$ $ϕ($$p^{e_1}_1$$p^{e_2}_2$$\cdots$$p^{e_k}_k)$
We know that $ϕ(n) = p-1$, and since it is $p.p.p\cdots$ $e$ times, so we took one $p$ and multiplied the rest $p^{e-1}$ with it
$ϕ(n)= (p − 1)$$p^{e−1}$ $ϕ($$p^{e_1}_1$$p^{e_2}_2$$\cdots$$p^{e_k}_k)$
$ϕ(np) = ϕ($$p^{e+1}$$p^{e_1}_1$$p^{e_2}_2$$\cdots$$p^{e_k}_k)$
As they are primes, their $gcd$ for every two of them is $1$, thus we can use this rule:
$= ϕ($$p^{e+1}) ϕ($$p^{e_1}_1$$p^{e_2}_2$$\cdots$$p^{e_k}_k)$
$= (p − 1)$$p^e$ $ϕ($$p^{e_1}_1$$p^{e_2}_2$$\cdots$$p^{e_k}_k)$
$= pϕ(n)$