If $A$ is a set of natural numbers and $k$ is a natural number greater than 1. We define: $B_k(A) = \{w|w $ is the representation of $x$ in base $k$ for $x\in A\}$.
Note that we do not allow leading $0$s. Find such a set $A$ that $B_2(A)$ is a regular language but $B_3(A)$ is not.
My insights: I wanted to try the usual approach using the pumping lemma. The problem is, the numbers that we choose to put into the set, should have a pattern in base $3$ that we can use when applying the pumping lemma and they also should have a pattern in base $2$ so that we know $B_2(A)$ is regular. For example I tried multiples of $6$ but I found no patterns.
$\def\<#1>{[#1]_3}$Let $\<z>$ be the number represented by the base-3 numeral $z$. Since the set of numbers $A = \{2^n - 1 \mid n \in \mathbb{N}\}$ is represented in binary by the regular expression $1^*$, if we prove that
$$L = B_3(A) = \{ z \in \{0,1,2\}^* \mid \exists n \in \mathbb{N} \,.\,\<z> = 2^n-1\} \cap \{1,2\}\cdot \{0,1,2\}^*$$
is not regular we are done.
We are going to use the pumping lemma for regular languages. Suppose $L$ is regular and $z$ is a word in $L$ longer than the pumping length $p$ of $L$. As such, it can be written as $uvw$ so that $|uv| \leq p$, $|v| \geq 1$, and for $i \in \mathbb{N}$, $uv^iw \in L$.
We write:
$$\<uvw> = \<u> 3^{|w|}3^{|v|} + \<v>3^{|w|} + \<w> \enspace,$$
and also:
$$\<uv^iw> = \<u> 3^{|w|}3^{i|v|} + \<v>3^{|w|}\Big(\sum_{0 \leq j < i} 3^{j|v|}\Big) + \<w> \enspace.$$
Subtraction and some algebra yield, for $i \geq 1$,
$$\<uv^iw> - \<uvw> = 3^{|w|+|v|} \,\frac{3^{(i-1)|v|} - 1}{3^{|v|}-1}\Big(\<u>(3^{|v|}-1) + \<v>\Big) \enspace.$$
Suppose $\<z> = 2^n-1$; for $m > n$, $2^m - 1 - (2^n - 1) = 2^n(2^{m-n} -1)$. Therefore all the differences $\<uv^iw> - \<uvw>$ for $i \geq 1$ must be multiples of $2^n = \<z> + 1$.
However, when $\frac{3^{(i-1)|v|} - 1}{3^{|v|}-1}$ is odd (which happens for alternating values of $i$ because it is the summation of terms that are all odd) the largest power of $2$ that is a factor of $\<uv^iw> - \<uvw>$ is bounded by the value of
$$ \<u> (3^{|v|} -1) + \<v> \enspace, $$
which is less than $3^p$. On the other hand, $z$ has at least $p+1$ ternary digits and no leading zeros, which means that $\<z>+1$ is greater than $3^p$. We have reached a contradiction and we have to abandon the assumption that $L$ is regular.