Is there an infinite countable topological space $X$ with only countably many continuous functions to itself?

It cannot be a metrizable space. Another large class of examples that I know of are Alexandrov topologies, however each Alexandrov topology corresponds to a preorder, and the continuous maps between two Alexandrov topologies correspond to the morphisms between the preorders. An infinite countable preorder has always $2^{\aleph_0}$ endomorphisms, hence I cannot find a counterexample there either. It also cannot be a filter (+ the empty set), because any function which restricts to the identity on a set in the filter is continuous (thanks to Eric Wofsey for this last fact).

Using the $\pi$-Base, an online database of topological spaces inspired by the book *Counterexamples in topology* and expanding it, I obtained this list of possible spaces. I proved for every one of these spaces that there were too many continuous maps, except for the Relatively prime integer topology (also known as the Golomb space) and the Prime integer topology. The first one was proved to have too many continuous maps, and the second one is very similar to the first one, so I don't place much hope on it. We need to look somewhere else.

On MSE, Mirko indicated the existence of the following paper:

ADVANCES IN MATHEMATICS 29 (1978), 89-130

Constructions and Applications of Rigid Spaces, I

V. Kannan, M. Rajagopalan

https://www.sciencedirect.com/science/article/pii/0001870878900063

In it, it is proven (Theorem 2.5.6) that, for any cardinal $\kappa$, if $(2^\kappa)^+ < 2^{2^\kappa}$, then there is a Hausdorff topological space of cardinality $\kappa$ which is strongly rigid, i.e. such that any continuous endofunction is either constant or the identity, which is a lot stronger than what we are trying to prove.

2more comments