I need some help with this math problem.

This kinda functions are called signum functions.
Looking at the question
Put n=2(even)
[tex]\\ \sf\longmapsto \dfrac{n}{2}=\dfrac{2}{2}=1[/tex]
Put n=3(odd)
[tex]\\ \sf\longmapsto 3(3)+1=9+1=10[/tex]
Hence done .
You can take any input for your answer.