Supposed a function in two variables is defined as $f(a,b) = \frac{a(a-1)b^{2}}{2}$, and $a,b \in N$ where a is fixed on a certain value while b runs from 1 to n.
For instance, $$f(4,1) = \frac{4(4-1)1^{2}}{2} = 6$$ $$f(4,2) = \frac{4(4-1)2^{2}}{2} = 24$$ $$f(4,3) = \frac{4(4-1)3^{2}}{2} = 54$$ $$f(4,4) = \frac{4(4-1)4^{2}}{2} = 96$$ $$f(4,5) = \frac{4(4-1)5^{2}}{2} = 150$$ I noticed that when I take the modulo of this functions in terms of $a$, I get
$$f(4,1) (mod \;4) =2$$ $$f(4,2) (mod \;4) =0$$ $$f(4,3) (mod \;4) =2$$ $$f(4,4) (mod \;4) =0$$ $$f(4,5) (mod \;4) =2$$
But the case is different if $a$ is odd number $$f(3,1) (mod\; 3) = 0$$ $$f(3,2) (mod\; 3) = 0$$ $$f(3,3) (mod\; 3) = 0$$ $$f(3,4) (mod\; 3) = 0$$ $$f(3,5) (mod\; 3) = 0$$
Observation:
- If $a$ is odd, the remainder is always 0
- If $a$ is even, the remainder is a series of $\frac {a}{2}, 0, \frac {a}{2}, 0, \frac {a}{2}, ...$
Can you give me any idea regarding this?