Does this function hit every odd number for some integers $n$ and $m$? I have recently been looking into a problem and created a function that looked interesting and I wondered if it would hit all odd numbers on a graph.

For integer $n$, define 
  $$g_n(x) = \frac13\cdot \begin{cases}
(3n-1) \cdot 2^{2x-1} - 1, & n \text{ even} \\[4pt]
(3n-2) \cdot 2^{2x\phantom{-1}} - 1, & n \text{ odd}
\end{cases} \tag{$\star$}$$
Is it true that, for any positive odd integer $k$, there are integers $n$ and $m$ such that $g_n(m)=k$?


PS: I think is easier to see as a graph: desmos graph

Note: The form of $(\star)$ is dramatically different than what appeared in the original version of this question. See answer by @Blue for the derivation, which matches coincident work by @automaticallyGenerated.  
 A: Too long for a comment.

We can re-write a bit:
$$\begin{align}
f_n &= \tfrac12 (6n-3+\cos(\pi n)) \\
&= \tfrac12 (6n-3+(-1)^n) & \text{(since $n$ is an integer)}\\
&= \tfrac12 (6n -4 + 1 +(-1)^n) \\
&= 3n-2+\color{red}{\tfrac12\left(1+(-1)^n\right)} \\
&= 3n-2+ \color{red}{\left( 1 - (n \bmod 2) \right)} & \text{(getting clever)} \\
&= 3n-3+ 2 - (n \bmod 2) \\
&= 3(n-1)+ 2 - (n \bmod 2) \\
\end{align}$$
The last steps are to prepare for this:
$$f_n \bmod 3 = 2 - (n\bmod 2)$$
Now, the $g_n$ function becomes:
$$g_n(x) = \tfrac13 \left(f_n \cdot 2^{2x-1+ (n\bmod 2)} - 1 \right)$$
At this point, having to refer back to $f_n$ is a bother, but inserting the expression for $f_n$ is cumbersome. Since there's only even/odd-ness to consider, the best option might be just to write-out the cases explicitly: 
$$g_n(x) = \frac13\cdot \begin{cases}
(3n-1) \cdot 2^{2x-1} - 1, & n \text{ even} \\[4pt]
(3n-2) \cdot 2^{2x\phantom{-1}} - 1, & n \text{ odd}
\end{cases}$$
This makes the $g_n$ function completely self-contained and easier to analyze.
A: It can be seen that $f_n = 3n+\frac{cos(\pi n)-3}{2}$. $\frac{cos(\pi n)-3}{2}$ will be equal to $-2$ if $n$ is odd and $-1$ if $n$ is even.
Thus, $f_n = 3n-(
n\pmod 2)-1$.
From that, we get
$$g_n(x) = \frac{(3n-(
n\pmod 2)-1)*2^{2x+1-(((3n-(
n\pmod 2)-1) \space \text{mod} \space 3))}-1}{3}$$
Simplifying this finds $$g_n(x) = \frac{(3n-(
n\pmod 2)-1)*2^{2x+1-(((-(
n\pmod 2)-1) \space \text{mod} \space 3))}-1}{3}$$
Simplifying this further finds $$g_n(x) = \frac{(3n-(
n\pmod 2)-1)*2^{2x+n\pmod 2 -1}-1}{3}$$
Let's say that $n = 2k$, with $k$ an integer.
Then, 
$$g_n(x) = \frac{(6k-1)*2^{2x-1}-1}{3}$$
If we fix $x = 1$, we get all values $y$, such that $y = 3 \pmod 4$
Similarly, if we fix $x = 2$, we get all values $y$, such that $y = 13 \pmod {16}$. 
If we fix $x = 3$, all values such that $y = 53 \pmod {64}$. In general, if we fix $x$ as a positive integer, we get all values such that $y = \frac{5*4^{x}-2}{6} \pmod {4^x}$
So far, we have proved that the odd integers of the form $y = $: $$3 \pmod {4}$$ $$13 \pmod {16}$$ $$53 \pmod{64}$$ etc exist.
Covering the other case, where $n = 2k+1$, we get $$g_n(x) = \frac{(6k+1)*2^{2x}-1}{3}$$ If we similarly fix $x$ as a positive integer, we get values $y$ such that $y = \frac{4^x-1}{3} \pmod {2^{2x+1}}$
This yields $y$ such that $y = $: 
$$1 \pmod {8}$$
$$5 \pmod {32}$$
$$21 \pmod {128}$$
etc exist.
Both of these sets cover all positive odd integers. The reason for this is that $3 \pmod 4$ covers all odd values except for $y = 1 \pmod 4$. $1 \pmod 8$ then covers all values that are not already covered except for $y = 5 \pmod 8$. Then $13 \pmod {16}$ covers everything except for $5 \pmod {16}$. This process can be extended ad infinitum until all odd positive integers are "covered".
Therefore, this function does cover all positive odd integers when $n, m$ are integers.
