# Explicit formula

## Homework Statement

Give an explicit formula for a function f : ℕ ⇒ ℕ that is

a) onto, but not one-to-one.
b) neither one-to-one nor onto.

1. The attempt at a solution
a) The formula f$_{2}$(n)= ⌊$\frac{n}{3}$⌋. it's onto cause f$_{2}$(3n)= n for every n. but, it's not one-to-one, cause f$_{2}$(1)= ⌊$\frac{1}{3}$⌋ = 0 = f$_{2}$(0)

b) f$_{4}$(n)=4 ⌊$\frac{n}{4}$⌋. This is not one-to-one, cause it's counterexample f$_{4}$(0) = f(1) = 0. Nor is it onto cause there is no odd number in the range of f$_{4}$

Last edited:

Dick
Homework Helper
1/3 isn't equal to 0. You have to explain what f_2 means a lot better than that. Do you mean something like the floor function? Oh, I see you do. Guess I should wait till you finish posting.

1/3 isn't equal to 0. You have to explain what f_2 means a lot better than that. Do you mean something like the floor function? Oh, I see you do. Guess I should wait till you finish posting.

Sorry for that, it wasn't completed yet, now it's.

Dick
Homework Helper
Sorry for that, it wasn't completed yet, now it's.

Mmm. ##f_2(1)=0##. 0 isn't in N is it? You might have to modify it a bit.

Mmm. ##f_2(1)=0##. 0 isn't in N is it? You might have to modify it a bit.

natural numbers { 0, 1, 2, 3, ...}

Yes it's.

eumyang
Homework Helper
natural numbers { 0, 1, 2, 3, ...}

Yes it's.
Not to me it isn't. In some places natural numbers do not include zero {1, 2, 3, ...}. We use another term, whole numbers, to indicate {0, 1, 2, 3, ...}. Why is there no agreement on the definition of natural numbers I have no idea.

Not to me it isn't. In some places natural numbers do not include zero {1, 2, 3, ...}. We use another term, whole numbers, to indicate {0, 1, 2, 3, ...}. Why is there no agreement on the definition of natural numbers I have no idea.

i agree.