In a simple derivation based of the ideal gas law, the entropy S is not an extensive variable as it must be. This is known as the Gibbs' paradox. The difficulty is resolved by letting the particles be indistinguishable.
References
Dieks, D. and van Dijk, V. Amer. J. Phys. 56, 430-434, 1988.
Erickson, G. W. and Fossa, J. A. Dictionary of Paradox. Lanham, MD: University Press of America, p. 73, 1998.
Gibbs, J. W. Trans. Conn. Acad. 3, 108 and 227-229, 1875-1876.
Gibbs, J. W. The Collected Works of J. W. Gibbs, Vol. 1. New Haven, CT: Yale University Press, 1948.
Jaynes, E. T. "The Gibbs Paradox." In Maximum Entropy and Bayesian Methods (Ed. C. R. Smith, G. J. Erickson, and P. O. Neudorfer). Dordrecht, Netherlands: Kluwer, pp. 1-22, 1992.
Lesk, A. M. J. Phys. A: Math. Gen. 13, L111-L114, 1980.
Lin, S.-K. "Gibbs Paradox of Entropy of Mixing: Experimental Facts, Its Rejection, and the Theoretical Consequences." J. Theoret. Chem. 1, 135-150, 1996
Lin, S.-K. "Molecular Diversity Assessment: Logarithmic Relations of Information and Species Diversity and Logarithmic Relations of Entropy and Indistinguishability After Rejection of Gibbs Paradox of Entropy of Mixing." Molecules 1, 57-67, 1996.
Lin, S.-K. "Understanding Structural Stability and Process Spontaneity Based on the Rejection of the Gibbs Paradox of Entropy of Mixing." J. Molec. Structure (Theorochem.) 398, 145-153, 1997.
Neumann, J. von. Mathematical Foundations of Quantum Mechanics. Princeton, NJ: Princeton University Press, 1955.
Richardson, I. W. Eur. Biophys. J. 17, 281-286, 1989.
van Kampen, N. G. "The Gibbs Paradox." In Essays in Theoretical Physics: In Honor of Dirk Ter Haar (Ed. W. E. Parry). Oxford, England: Pergamon Press, pp. 303-312, 1984.