Finding a function $f$ such that $f(3n)=1$, $f(3n+1)=5/3$, $f(3n+2)=8/3$, where $n$ is an integer 
Determine a function $f(x)$ such that :

*

*$f(3n)=1$

*$f(3n+1)=5/3$

*$f(3n+2)=8/3$
where $n$ is an integer

How can you determine it? Thanks for the help!

I guess, topicstarter wants some closed form description of his function like 
$$f(k)=\frac{9}{2}(1*(k+1-3[\frac{k+1}{3}])(k+2-3[\frac{k+2}{3}])+\frac{5}{3}*(k-3[\frac{k}{3}])(k+1-3[\frac{k+1}{3}])+\frac{8}{3}*(k+2-3[\frac{k+2}{3}])(k-3[\frac{k}{3}]).$$
