If $n > 0$ is an even composite integer, is the corresponding totient $\varphi(n)$ also even?
I found that it is not the case for $n$ odd; for $\varphi(15) = 8$.
If $n > 0$ is an even composite integer, is the corresponding totient $\varphi(n)$ also even?
I found that it is not the case for $n$ odd; for $\varphi(15) = 8$.
One possible hint:
Use this fact that $\varphi$ is a multiplication function, that is $\varphi(xy)=\varphi(x)\varphi(y)$ while $\gcd(x,y)=1$.
Use this fact that $\varphi(p^n)=p^n-p^{n-1}$.
Consider different cases for a given $n$.
Let $n$ be any integer greater than $2$. Note that $\frac{n}{2}$, if it is an integer, is not relatively prime to $n$.
So the numbers in the interval $[1,n-1]$ that are relatively prime to $n$ can be divided into two groups.
Group A consists of the numbers in the interval $1\le x\lt n/2$ which are relatively prime to $n$.
Group B consists of the numbers in the interval $n/2\lt x\le n-1$ which are relatively prime to $n$.
There are just as many numbers in group A as there are in group B. For $x$ is in A if and only if $n-x$ is in B.
Since the numbers in $[1,n-1]$ that are relatively prime to $n$ can be divided into two groups of equal size, it follows that $\varphi(n)$ is even.
Remark: More informally, two numbers $a$ and $b$ in the interval $[1,n-1$ that are relatively prime to $n$ will be called a happy couple if $a+b=n$. If $n\gt 2$, the numbers in the interval $[1,n-1]$ that are relatively prime to $n$ are divided into happy couples, so there is an even number of them.
$\varphi(n)$ counts the number of integers $i \in \{1,\ldots,n\}$ with $(i,n)=1$. And $(i,n)=1$ if and only if $(n-i,n) = 1$. So we can pair off integers less than $n/2$ with integers greater than $n/2$ and less than $n$; hence the number of such integers not equal to $n$ or $n/2$ is even.
If $n$ is odd, no integer is equal to $n/2$, so $\varphi(n)$ is even (unless $n=1$, in which case $n$ itself counts towards the total, so $\varphi(1)=1$).
If $n$ is even, $(n/2,n) = n/2$, which is not equal to $1$ unless $n=2$. So if $n > 2$, then $n/2$ is not counted towards $\varphi(n)$, and again $\varphi(n)$ is even.