Whether Functions With A Periodic-Like Property Are Constant 
Call a function $f(x)$ defined over $\mathbb R \setminus \{0\}$ “drunken periodic” if $$\forall k \in \mathbb Z \setminus \{0\}, q \in (0,1), f(kq)=f(q)$$Are all drunken periodic functions constant?

This question came from a math class I was taking (Honors Precalculus and AP Calculus BC)- we were discussing periodicity of functions, and the teacher asked for a rigorous definition of periodicity in a function (assuming that that function is defined over $\mathbb R$). One of the other students (presumably) misspoke in trying to make rigorous the intuitive definition, and multiplied the period to get the equality, rather than adding it. I thought this was an interesting class of function to analyze, but didn’t get anywhere- I may simply not have the tools necessary. I call it drunken periodic not to insult the student who made the mistake, but only because I find that name amusing.
 A: First of all, there's no reason to restrict to $q\in(0,1)$ in your definition; you may as well just say $q\in\mathbb{R}$. Next, call two real numbers $x$ and $y$ rational-equivalent if there's some $r\in\mathbb{Q}\setminus \{0\}$ (yes, I appreciate the confusion in notation here!) such that $x=ry$. Note that rational-equivalence is a proper equivalence relation (this is a good thing to show!), so we can partition $\mathbb{R}$ into equivalence classes. Now, as long as $f()$ is constant on each equivalence class, then it's drunken-periodic but not constant. As a simple example, consider $f(x)=1$ if there's some $q\in\mathbb{Q}$ such that $x=q\sqrt{2}$, and $f(x)=0$ otherwise.
Trickier but worthwhile exercise: if $f()$ is continuous, then it is constant...
A: No: for instance, $f(x)$ could be $0$ for all $x\in\mathbb{Q}$ and $1$ for all $x\in\mathbb{R}\setminus\mathbb{Q}$.
More generally, say that $x\sim y$ if there is a nonzero rational number $q$ such that $qx=y$.  It is easy to check that $\sim$ is an equivalence relation, and each equivalence class is countable (since there are only countably many choices of $q$) so there are uncountably many equivalence classes.  But a "drunken periodic" function is just a function that is constant on each individual equivalence class.  Indeed, if $f$ is constant on each equivalence class, then it is drunken periodic since $kq\sim q$ for any $q\in (0,1)$ and $k\in\mathbb{Z}\setminus\{0\}$.  Conversely, suppose $f$ is drunken periodic and $x\sim y$; we wish to show $f(x)=f(y)$.  If $x=0$ then $y=0$ and it is trivial that $f(x)=f(y)$.  If $x\neq 0$, then $x/y$ is a rational number, say $a/b$ for integers $a$ and $b$.  Let $N$ be nonzero an integer divisible by $a$ such that $x/N\in (0,1)$ (such an $N$ exists: just choose $N$ to have the same sign as $x$ and a sufficiently large absolute value).  Then $f(x/N)=f(x)$ since $f$ is drunken periodic, and also $$f\left(\frac{x}{N}\right)=f\left(\frac{x}{N}\cdot \frac{bN}{a}\right)=f\left(\frac{xb}{a}\right)=f(y)$$ since $bN/a$ is a nonzero integer.  Thus $f(x)=f(y)$, as desired.
