Update (2025-01-07) I have just cross-posted this question at MO.
In the following, all topological spaces are Hausdorff. Let $\kappa$ be a cardinal, $\kappa \le 2^\mathcal c$.
The following are equivalent:
- There exists a non-empty compact, separable topological space $X$ with $|X| = \kappa$.
- There exists a compactification $\gamma \mathbb N$ of the discrete space $\mathbb N$ with $|\gamma \mathbb N \setminus \mathbb N| = \kappa$.
- $0 < \kappa < \omega$ or there exists a compactification $\gamma \mathbb N$ of $\mathbb N$ with $|\gamma \mathbb N| = \kappa$.
PROOF.
(1) $\Rightarrow$ (2)
Let $X$ be as in (1). There exists an increasing family $(D_n)_{n \in \mathbb N}$ of finite subsets of X, such that
$\bigcup_{n \in \mathbb N} D_n$ is dense in $X$.
Define $D = \bigcup_{n \in \mathbb N} (D_n \times \{\frac{1}{n}\})$ and $Y = D \cup (X \times \{0\}) \subset
X \times (\{\frac{1}{n}: n \in \mathbb N\} \cup \{0\})$
with the subspace topology of the product topology.
It is easy to see that $D \cong \mathbb N$ and $Y$ is a compactification of $D$.
Hence, $|Y \setminus D| = |X \times \{0\}| = \kappa$.
(2) $\Rightarrow$ (3) and (3) $\Rightarrow$ (1) are obvious.
Does there exist a compact, separable topological space $X$ with $|X| = \kappa$?
Notes
For a regular space $X$, we have $|X| \le 2^{2^{d(X)}}$, hence $\kappa$ as above cannot be larger.
If $\kappa \le \omega$, the answer is obviously affirmative, but also, if $\kappa = \omega_1$. [There exists a compactification of the integers with remainder homeomorphic to the ordinal space $\omega_1+1$ (Engelking, General topology, 3.12.18 (c)).]
If $\kappa = 2^\lambda$ for a cardinal $\lambda \le 2^\omega$, the topological space $2^\lambda$ is compact, separable. Hence, the answer is also affirmative. In particular, it is true for $\kappa = 2^\omega, 2^{\omega_1}, 2^\mathcal c, \ldots$
By 3. (and 2.), the answer is affirmative in case of (GCH). ($\omega_2 = 2^{2^\omega}$ suffices).
The smallest unclear case seems to be $2^\omega < \kappa = \omega_2 < 2^{\omega_1}$. Perhaps also particularly interesting is $2^\omega < \kappa = \aleph_\omega < 2^{\omega_1}$. (See addendum below.)
Without $T_2$, the answer would trivially be yes: any set with the indiscrete topology is compact, separable.
Without separability, the answer would be yes: the ordinal space $\kappa+1$ is compact.
For $\omega < \kappa \neq 2^\omega$, a compact $X$ of size $\kappa$ cannot be first countable.
[Removed, since obsolete by the addendum.]
Also in the light of the above equivalences, this question seems to be so basic. Thus, I would expect that it has already been considered. However, I couldn't find any information about it.
This MO question is related. In particular, it contains some additional answers for some $\kappa$ of countable cofinality.
Of course, this is equivalent to the existence of locally compact, separable spaces of size $\kappa$.
Addendum
If $\kappa \le 2^\omega$, the answer is affirmative:
W.l.o.g., $\kappa$ infinite.
As it is well-known, there exists an almost disjoint family $\mathcal A$ of size $\kappa$ of subsets of $\mathbb N$.
Consider the Mrowka-Isbell space
$\Psi(\mathcal A)$:
Its underlying set is $\mathbb N \cup \mathcal A$. Points of $\mathbb N$ are isolated, basic neighborhoods of $A \in \mathcal A$ are of the form $\{A\} \cup (A \setminus F)$, $F$ finite.
It is easy to see that such a set is clopen and compact.
Hence,
$\Psi(\mathcal A)$ is locally compact.
It is Hausdorff, since the intersection of any two different sets in $\mathcal A$ is finite.
Moreover, $\mathbb N$ is dense, hence the space is separable.
Of course, $|\Psi(\mathcal A)| = \kappa$.
Hence, its one-point compactification is as required.
Thus, there remain the cases $2^\omega < \kappa < 2^\mathcal c$.