Question: Definition : 

Assume that $I$ is an interval.  

A function $f : \mathbb R \to \mathbb R$ is locally bounded on $c \in I$ if there exist $\delta \gt 0 $ and $M \gt 0$ such that :  

$\forall x \in I \space\space \space |x-c| \lt \delta \implies |f(x)|\le M$ 

Question : 

Assume that $f:\mathbb R \to \mathbb R$ is a function defined this way :  

If $x$ is not rational, $f(x)=0$.  

If $x=\frac{p}{q}$ ( rational ) such that $p,q \in \mathbb Z$ and $q \gt 0$ , then $f(x)=(-1)^pq$.  

Prove that $f$ is not locally bounded on any point of $(0,1)$ . 

Note : What should i do ? Is this gonna work if assume that $f$ is locally bounded on an arbitrary point of $(0,1)$ ? Will it reach a contradiction?

Answer: 
Let $ K ( q ) = \sum \_ { k = 1 } ^ { q - 1 } k ! $. Since $ q ! \equiv 0 \pmod q $, thus $ c $ is an integer such that for every positive integer $ q $, we have $ K ( q ) \equiv c \pmod q $. for instance, we have $ K ( q ! ) \equiv c \pmod { q ! } $. But by definition of $ K $, we know that $ K ( q ! ) \equiv K ( q ) \pmod { q ! } $, which leads to $ K ( q ) \equiv c \pmod { q ! } $. Hence there is a sequence of integers like $ ( k \_ q ) \_ { q \in \mathbb Z ^ + } $ such that $ c = k \_ q \cdot q ! + K ( q ) $. Now for every positive integer $ q $:
$$ 0 = c - c = k \_ { q + 1 } \cdot ( q + 1 ) ! + K ( q + 1 ) - k \_ q \cdot q ! - K ( q ) = \big( ( q + 1 ) k \_ { q + 1 } - k \_ q + 1 \big) q ! $$
$$ \therefore \quad k \_ { q + 1 } = \frac { k \_ q - 1 } { q + 1 } $$
Now using induction we show that for every natural number $ n $, we must have $ | k \_ q | \ge q ^ n $. For the base case, we note that if $ k \_ q = 0 $, then $ k \_ { q +1 } $ can't be an integer, so $ | k \_ q | \ge 1 = q ^ 0 $. For the induction step, we have:
$$ \frac { | k \_ q | + 1 } { q + 1 } \ge \frac { | k \_ q - 1 | } { q + 1 } = | k \_ { q + 1 } | \ge ( q + 1 ) ^ n $$
$$ \therefore \quad | k \_ q | \ge ( q + 1 ) ^ { n + 1 } - 1 \ge q ^ { n + 1 } $$
But this leads to an obvious contradiction. So $ c $ doesn't exist.
I found this question very interesting, since it's easy to prove that $c$ is not constant by example meanings, however, the relevant part is to give the proof mathematically, which I think I have found.

We assume that for $q=k$ ; $q=k+1$ and that $c$ is constant, so the following relations should hold:

$0 \equiv \sum\_{i=1}^{k}i! - c \pmod k$

$0 \equiv \sum\_{i=1}^{k+1}i! - c \pmod{k+1}$

Let's put all together:

$c=\sum\_{i=1}^{k}i! -kp$

$0 \equiv \sum\_{i=1}^{k+1}i! - \sum\_{i=1}^{k}i! -kp \pmod{k+1}$

$0 \equiv (k+1)! + \sum\_{i=1}^{k}i! - \sum\_{i=1}^{k}i! -kp \pmod{k+1}$

$0 \equiv (k+1)! -kp \pmod{k+1}$

$p=\sum\_{i=1}^{k}i! - c$

$0 \equiv (k+1)! -k(\frac{\sum\_{i=1}^{k}i! - c}{k}) \pmod{k+1}$

$0 \equiv (k+1)! - \sum\_{i=1}^{k}i! - c \pmod{k+1}$ ($\*$)

Since $\sum\_{i=1}^{k}i! - c$ is multiple of $k$ then for the latter ($\*$) to be true we need that:

$GCD(k+1, \sum\_{i=1}^{k}i! - c) \neq 1$

Maybe sounds a bit confusing at the first time, but makes sense. This attempt just tell us for $c$ to be constant the sum of the previous factorials minus $c$ has to be multiple of the current modulus.

For example, take k=5

$GCD(k+1, \sum\_{i=1}^{k}i! - c) = GCD(6, 153 - 3) = GCD(6,150) = 6$ so both $k$ and $k+1$ will yield same $c$

but for k=6

$GCD(k+1, \sum\_{i=1}^{k}i! - c) = GCD(7, 873 - 3) = GCD(7,870) = 1$ thus $c$ in $k$ and $c$ in $k+1$ yield $3$ and $5$ respectively.

Take into account that I have put some effort elaborating this answer, maybe there exists other simple proof, but I least I try to throw some light to the question.