Continuous functions on discrete product topology Let $A = \{a_1,\dots,a_m\}$ be a finite set endowed with a discrete topology and let $X = A^{\Bbb N}$ be the product topological space. I wonder which bounded functions $f:X\to\Bbb R$ are continuous on $X$. 
For example, it is clear that if $f$ depends only on a finite number of coordinates then $f\in C(X)$, i.e. if there exists some finite $n$ such that
$$
f(x_1,\dots,x_n,x_{n+1},x_{n+2},\dots) = f(x_1,\dots,x_n,x'_{n+1},x'_{n+2},\dots) \quad \forall x_{n+1},x_{n+2},x'_{n+1},x'_{n+2},\dots
$$
then $f\in C(X)$. Thus it seems that only dependents on infinitely many coordinates may violate continuity. I would be happy, if one could tell me whether there are some useful necessary/sufficient conditions to assure $f\in C(X)$.
In particular, if $B\subset A$ and $1_B(a)$ is the indicator (characteristic) function of $B$, does it hold that 
$$
  g(x):=\limsup\limits_{k\to\infty}1_B(x_k)
$$
is a continuous function on $X$.
 A: Yes, there are, and probably numerous. The basic idea is the following:
Theorem.
Let $[a_1\dotsm a_n]:=a_1\dotsm a_n A^{\mathbb N}$ denote the set called a cylinder. Then basically, $f$ is continuous if an only if 
$$ \operatorname{diam} f\bigl([a_1\dotsm a_n]\bigr)\xrightarrow{n\to\infty}0
\quad\text{for all}\quad a_1a_2a_3\dotsm\in A^{\mathbb N},$$
where $\operatorname{diam}Y$ is the diameter of a set.
This property is crucial for all numeration systems. For example, for the decimal expansion one has $f(a_1a_2a_3\dotsm)=\frac{a_1}{10}+\frac{a_2}{100}+\frac{a_3}{1000}+\dotsb$ and diameter of image of cylinder of $[a_1\dotsm a_n]$ is exactly $10^{-n}\to0$, hence $f$ is continuous. The same is true for the binary system as well, generally for all radix representations. But it is true even for continued fractions when written as an infinite seqence of matrices $L=\begin{pmatrix}1&0\\1&1\end{pmatrix}$, $R=\begin{pmatrix}1&1\\0&1\end{pmatrix}$, and for many other systems as well.
Proof.
On the set $A^{\mathbb N}$ we use the (sometimes called) Cantor topology given by a Cantor metric: $\rho(\mathbf{a},\mathbf{b})=2^{-k}$ where $k=\min\{j:a_j\neq b_j\}$ (bold letters indicate infinite words).
Continuity of $f$ means
$$ (\forall \mathbf x\in A^{\mathbb N})(\forall\varepsilon>0)(\exists\delta>0)(\forall \mathbf y\in A^{\mathbb N}, \rho(\mathbf x,\mathbf y)<\delta)(\lvert f(\mathbf y)-f(\mathbf x)\rvert<\epsilon)$$
Since the sets of such $\mathbf y$ are exactly some cylinders, this should be obviously equivalent to the theorem statement.
Remark.
Notice that all the cylinders are clopen sets, which is very interesting itself.
A: I do not know whether there are general conditions, but I can answer your particular question: Note that the sequence $(y^n)$ with $y^n = (x_1, x_1, \ldots, x_1, x_2, \ldots)$ with $n$ $x_1$'s converges to $y = (x_1, x_1, \ldots)$ in $A^{\mathbb N}$. Now let $B = \{x_2\}$, we have for any $n$: 
$$ g_B(y^n) = \limsup_{k\to\infty} 1_B(y^n_k) = 1 $$
(as $y^n_k = x_2$ for $k> n$). But 
$$ g_B(y) = \limsup_{k\to\infty} 1_B(x_1) = 0 $$
So $y^n \to y$, but $g(y^n) \not\to g(y)$ hence $g$ isn't continuous.
