This is (a slight paraphrase) of question 1.3.14 in Chang and Keisler's Model Theory book.
"Show that for each natural number $n$, there is a language $L_n$ and finite model $M_n$ of $L$ such that $M_n$ has precisely $n$ undefinable elements."
Here, an element $x\in M$ is definable if there is a (first order) formula in $L$, called $\phi$, such that $x$ is the unique element of $M$ satisfying $\phi$. Of course, "undefinable" means "not definable".
It is starred, indicating that it is more difficult than a standard problem in that book.
Chang and Keisler remark that $n=1$ is the only difficult case. In that spirit, here is the proof for all $n\neq 1$.
Let $L_n$ have a single 2 place predicate symbol (I'm thinking of $L_n = \{ < \}$). Let $M_n$ be the partial order with minimum a and with elements $b_1,...,b_{n}$ with $a < b_i$ for all $i$ and the $b_i$ pairwise incomparable.
First note that a is definable: it uniquely satisfies $\phi(x) =$ for all y, $x\leq y$.
Now, if $n =0$, there are no $b_i$, and hence in this model, we have 0 undefinable elements.
If $n > 1$, then I claim that all the $b_i$ are undefinable. The short answer is that any permutation of the $b_i$ can be extended to a unique isomorphism of $M_n$. Hence, for any formula $\phi$, we have $\phi(b_i)$ iff $\phi(b_j)$ for all $b_j$. Thus, no $\phi$ can single out any particular $b_i$, so each $b_i$ is undefinable.
This proof fails completely for $n=1$, for then $b_1$ is the unique element that satisfies "b_1 is not a". Or more in the spirit of first order logic, $b_1$ is the unique element satisfying $\phi(x) =$ there is a $y$ such that for all $z$, $y< z$ and $x$ is not equal to $y$." Incidentally, this proves that any such model that works for $n=1$ must have at least 3 elements.
So, my question is:
What is an example of a language with finite model having precisely one undefinable element? Is the smallest cardinality of such a model known?
Thanks in advance!