function is multiplicative

66 Views Asked by At

Consider

$ f(n) = \begin{cases} 0 & \quad \text{if } n \text{ is even}\\ 1 & \quad \text{if } n \equiv 1 \text{ mod } 4\\ -1 & \quad \text{if } n \equiv -1 \text{ mod } 4 \end{cases} $

How is it possible to show then that $f(.)$ is multiplicative ?

1

There are 1 best solutions below

0
On BEST ANSWER

To show that, you have to consider the different cases and the compatibility of product with the $\equiv [4]$ relation. If $n \equiv x[4]$ and $m \equiv y [4]$, then $nm \equiv xy [4]$. So:

  • If $n$ or $m$ are even then their product also. Then $f(nm)=0=f(n)f(m)$
  • If $x=1$ and $y=1$, Then $f(nm)= 1 = f(n)f(m)$
  • If $x=1$ and $y=-1$ or $x=-1$ and $y=1$ , Then $f(nm)= -1 = f(n)f(m)$
  • If $x=-1$ and $y=-1$, Then $f(nm)= 1 = (-1)^2= f(n)f(m)$