<s>[INST] 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.  
 [/INST] 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.
</s>