Why is the long-run equilibrium number of firms indeterminate when all firms in the industry share the same constant returns-to-scale technology and face the same factor prices? How to show it mathematically?
Responding first to a comment under the original post, in this particular case, the mathematical model has been almost fully described verbally: constant-returns to scale, price-taking behavior in the factors' markets. What is missing is the assumption on the behavior in the product market, but I would say that it is clear that the question pertains to a well-known issue we have with perfect competition.
So I will provide an answer, but, applying reciprocity as an economist should, it will also be verbal.
Under constant returns to scale and price-taking behavior in the factors' markets, the cost function is linear in output, and so marginal cost is everywhere equal to average cost. This means that the optimal quantity to be produced is indeterminate (second-order conditions for profit maximization are not satisfied). So we cannot say how much each (identical per assumptions) firm will produce, and therefore market equilibrium (for some given total quantity demanded) cannot provide the number of firms.
So set up a constant returns to scale production function, solve the maximization problem, and show that s.o.c are not satisfied, show that cost can be written as a linear function of output, solve the profit maximization problem with respect to output, see what you get and remember what happens to profits and so to selling price and marginal cost in the long run.