# Math Help - Number Theory - Multiplicative Functions

1. ## Number Theory - Multiplicative Functions

Another one of those interesting number theory questions:

2. Originally Posted by moolimanj
Another one of those interesting number theory questions:

F(7)=5
F(8)=0
F(9)=3
F(12)=0.
Is it right?

Keep Smiling
Malay

3. Now if $n$ is even, say $6$ then $1,2,3,4,5,6$ any two adjacent ones you take we have one is even and one is odd. Thus $\gcd (a,n) , \gcd (a+1,n)$ cannot be both 1 because at least one of them is at least 2.

For the converse consider $1,2,...,n$ and pick the first two and so $\gcd(1,n) , \gcd(2,n)$ we know that $\gcd(1,n)=1$ but since $F(n)=0$ it means $\gcd (2,n) \not = 1$ (otherwise $F(n)\not = 0$) and so it has to be $\gcd(2,n) = 2$ which means $2|n$.

4. If prime $p$ then in the integers $1,2,...,p$ we see that $\gcd(1,p)=\gcd(2,p) = 1 , \gcd(2,p)=\gcd(3,p) = 1, ... ,\gcd(p-2,p)=\gcd(p-1,p)=1$. Thus we have $p-2$ cases.