Question
Let $n\in N$, and let $S$ be a finite set in $Z^n$. What is the dimension $d(n,S)$ of the space $F(n,S)$ of bounded functions $f:\mathbb Z^n\to \mathbb R$ that are discrete harmonic on $Z^n\setminus S$?
Definition
A function $f:\mathbb Z^n\to \mathbb R$ is discrete harmonic iff $$ 2nf(x) = \sum_{i=1}^n [f(x-e_i)+f(x+e_i)], \tag{*}\label{H} $$ for all $x\in \mathbb Z^n$, where $(e_1,\ldots,e_n)$ is the canonical basis of $\mathbb Z^n$.
Note that the condition \eqref{H} can be interpreted as that $f$ is a martingale w.r.t. a symmetric random walk on $\mathbb Z^n$.
The case $n=3, S=\{0\}$
This question was motivated by the question about existence of a bounded non-constant function $f:\mathbb Z^3 \to \mathbb R$ that is discrete harmonic except at the origin $(0,0,0)$. An example of $f\in F(3,\{0\})$ is $f_1(x)$ equal to the probability that a symmetric 3D random walk starting from $x$ hits the origin. It can then be asked if all functions in $F(3,\{0\})$ can be obtained as linear combinations of $f_1(x)$ and the constant function $f_0(x)=1$.
The case $S=\{0\}$
For $n=1$ and $n=2$ the question is closely related to the related question with $S=\emptyset$. A random walk in 1D and 2D is guaranteed to return to the origin. This suggest that $d(1,\{0\})=d(2,\{0\})=1$.
For $n\geq 3$ it is no more guaranteed that the random walk will be absorbed in at the origin and so there is at least one more dimension associated the "value of never returning". Can we conclude that $d(n,\{0\}) = 2$ for $n\geq 3$?
The case $n=1$
Consider $S=\{a,b\}$. If $b=a+1$, then $f(a)=f(a-1)=\ldots$ and $f(b)=f(b+1)=\ldots$, but $f(a),f(b)$ can be arbitrary. What is more, $f(x)$ has to be linear between the points $a$ and $b$. For the general case of $S\subset \mathbb Z$ with $|S|\geq 2$, $f$ is constant below $\min(S)$ and above $\max(S)$, and is linear in between the points of $S$.