how to show that a function$f$ is contained in all natural numbers?

681 Views Asked by At

Let $f:\mathbb{N}\times\mathbb{N}\rightarrow \mathbb{R}$ be defined by $f(a, b) = \frac{(a+1)(a+2b)}{2}$. Carefully show that the image of $f$ is contained in $\mathbb{N}$.

2

There are 2 best solutions below

2
On

Clearly for for positive integers $a,b$, $f(a,b)$ will be positive. Now notice that $$(a+1)(a+2b) \equiv a^2 + a + 2ab + 2b \equiv a^2 + a \equiv a(a+1) \pmod{2}.$$ Since $a(a+1)$ is the product of two consecutive integers, it is divisible by two, hence $$(a+1)(a+2b)$$ is divisible by two, hence $f(a,b) = \frac{(a+1)(a+2b)}{2}$ is an integer, and we've shown already it's positive. Thus the image is in $\mathbb{N}$.

0
On

You just need either $(a+1)$ or $(a+2b)$ to be a multiple of $2$, if the $f(a,b)$ has to return a value in $\mathbb{N}$.

When $a$ is odd? $(a+1)$ is even and thus $2|(a+1)$

What happens when $a$ is even? $a=2k$ and $(2k+2b)=2(k+b) $ is even, thus $2|(a+2b)$

Therefore, you can conclude that $f(a,b)$ has all of its images in $\mathbb{N}$