# Surjective proof & finding inverse

1. Nov 10, 2013

### synkk

prove the function $g: \mathbb{N} \rightarrow \mathbb{N}$ $g(x) = \left[\dfrac{3x+1}{3} \right]$ where $[y]$ is the maximum integer part of r belonging to integers s.t. r less than or equal to y is surjective and find it's inverse

I know this function is bijective, but how do I prove it's surjective? Could I just say g(x) = y $\left[\dfrac{3x+1}{3} \right] = y$ so $x = \left[\dfrac{3y-1}{3} \right ]$ and say that $g^{-1}(x) = \left[\dfrac{3y-1}{3} \right ]$

2. Nov 10, 2013