# Math Help - Need help showing that the image of a function is contained in N

1. ## Need help showing that the image of a function is contained in N

Let f: N x N -> R be defined by f(a,b) = (a+1)(a+2b)/2. Show that the image of f is contained in N.

N is the set of natural numbers
R is the set of real numbers

How do I do this? I don't know where to even start.

Another question, but this one is optional:
Determine exactly which natural numbers are in the image of f

2. Hi

The question is: given two natural numbers $a$ and $b,$ is $(a+1)(a+2b)$ even?
With the form of the product, you can have the idea of checking what happens wether $a$ is odd or even:

if $a$ is odd, $a+1$ is even, and $(a+1)(a+2b)$ is even.

if $a$ is even, $a+2b$ is even, and $(a+1)(a+2b)$ is even.

So $\forall a,b\in\mathbb{N},\ \frac{(a+1)(a+2b)}{2}\in\mathbb{N}.$ That answers your first question.

Let $n$ be an integer. $f(0,n)=\frac{1\times 2n}{2}=n$. Therefore every natural number is in the image of $f.$

3. A comment on clic-clac's last statement: Many people do not include 0 in N. If that is the case here, clic-clac's example cannot be used.

Certainly 1 is in N and f(1,b)= (1+1)(1+ 2b)/2= 1+ 2b so all odd numbers larger than 1 are in the set. f(2,b)= (1+2)(2+ 2b)/2= 3(2b)= 3(b+1) so the set also includes even multiples of 3. In fact, taking a to be any even number, say a= 2n, f(2n,b)= (2n+1)(2n+ 2b)/2= (2n+1)(n+b) and given any positive integer m larger than n, we can take b= m-n to give f(2n,m-n)= (2n+1)m so we can get any odd multiple of any positive integer.

The only question left is "Can f(a,b) equal a power of 2?" Since $f(a,b)= \frac{(a+1)(a+2b)}{2}= 2^n$ is the same as $(a+1)(a+ 2b)= 2^{n+1}$. that question reduces to "can a+1 and a+ 2b both be powers of 2?" In fact, they cannot both be even and so cannot both be powers of 2. If a+ 1 is even, then a itself is odd and so a+ 2b is odd.

IF 0 is not a possible value for a or b, the image of f(a,b) is the set of all positive integers except the powers of 2.

4. Many people do not include 0 in N.
Cultural difference , I'll remember that!