Question: Given the following problem:

> 
> Obtain the values of $\lambda$ for which the operations $\oplus$ and $\otimes$ given by the expressions $a \oplus b = a + b - 6$ and $a \otimes b = ab + \lambda a + \lambda b + 42$ respectively, induces in $\mathbb{Z}$ the ring structure $(\mathbb{Z}, \oplus, \otimes)$. Describe in details all the steps and the justification to obtain the values of $\lambda$.
> 
> 
> 

**What I have tried:**

* Internal Law of $(\mathbb{Z}, \otimes)$:
$$
a \otimes b = ab + \lambda a + \lambda b + 42
= ab + \lambda (a + b) + 42 \in \mathbb{Z}
$$
for
$$
\lambda (a + b) \in \mathbb{Z}
$$
* Associativity of $(\mathbb{Z}, \otimes)$:
$$
a \otimes (b \otimes c) = (a \otimes b) \otimes c
$$
In which I ended up with:
$$
42a + \lambda (a + \lambda c + 42) = 42c + \lambda (\lambda a + 42 + c)
$$
* Distributivity:
$$
a \otimes (b \oplus c) = a \otimes b \oplus a \otimes c
$$
In which I got:
$$
-6a - 6 \lambda = \lambda a + 36
$$
Which tells me that:
$$
\lambda = -6
$$

And here I am stuck. Did I start correctly? Where do I continue?

Answer: 
Let $x\ne 0$. for $n\in\mathbb N,$
$$f (x)=f (\frac {x}{2^n} )$$

$f $ is continuous at $0$ and $$\lim\_{n\to+\infty}\frac {x}{2^n}=0$$

$$\implies \lim\_{n\to+\infty}f (\frac {x}{2^n})=f (0) $$

thus

$$(\forall x\in\mathbb R) \;\;f (x)=f (0) $$
Not an answer, but too long for a comment.

Notice that the answer would be very different with $f$ continuous everywhere but at $x=0$.

We have (with $\lg x:=\log\_2 x$)

$$f(2^{\lg x+1})=f(2^{\lg x}).$$

Then let 

$$g:[1,2]\to\mathbb R:t\to g(t)$$ be an *arbitrary* continuous function such that $g(2)=g(1)$.

Now,

$$f(x):=g(2^{\{\lg x\}})$$ is a continuous solution for the positive $x$ (the curly braces denote the fractional part). A similar solution can be written for the negative $x$.

A simple example below:

[![enter image description here](https://i.stack.imgur.com/IvCgL.png)](https://i.stack.imgur.com/IvCgL.png)