What you've stumbled upon is called the "Gibbs paradox", and the resolution is to divide the phase space for entropy calculations in statistical mechanics by the identical particle factor, which reduces the number of configurations.
Since the temperature is unchanged in the process, the momentum distribution of the atoms is unimportant, it is the same before and after, and the entropy is entirely spatial, as you realized. The volume of configuration space for the left part is:
${V_1^N \over N!}$
and for the right part is:
${V_2^N\over N!}$
And the total volume of the 2N particle configuration space is:
$(V_1V_2)^N\over (N!)^2$
When you lift the barrier, you get the spatial volume of configuration space
$(V_1 + V_2)^{2N} \over (2N)!$
When $V_1$ and $V_2$ are equal, you naively would expect zero entropy gain. But you do gain a tiny little bit of entropy by removing the wall. Before you removed the wall, the number of particles on the left and on the right were exactly equal, now they can fluctuate a little bit. But this is a negligible amount of extra entropy in the thermodynamic limit, as you can see:
${(2V)^{2N}\over (2N)!} = {2^{2N}(N!)^2\over (2N)!}{V^{2N}\over (N!)^2}$
So that the extra entropy from lifting the barrier is equal to:
$ \log ({(2N)!\over 2^{2N}(N!)^2})$
You might recognize the thing inside the log, it's the probability that a symmetric +/-1 random walk returns to the origin after N steps, i.e. the biggest term of the Pascal triangle at stage 2N when normalized by the sum of all the terms of Pascal's triangle at that stage. From the Brownian motion identity or equivalently, directly from Stirling's formula), you can estimate its size as ${1\over \sqrt{2\pi N}}$, so that the logarithm goes as log(N), it is sub-extensive, and vanishes for large numbers.
The entropy change in the general case is then exactly given by the logarithm of the ratio of the two configuration space volumes before and after:
$e^{\Delta S} = { V_1^N V_2^N \over (N!)^2 } { (2N)! \over (V_1 + V_2)^{2N}} = { V_1^N V_2^N \over ({V_1 + V_2 \over 2})^{2N}} {(2N)!\over 2^{2N}(N!)^2}$
Ignoring the thermodynamically negligible last factor, the macroscopic change in entropy, the part proprtional to N, is:
$\Delta S = N\log({4 V_1 V_2 \over (V_1 + V_2)^2})$
up to a sign, it is as you calculated.
Additional comments
You might think that it is weird to gain a little bit of entropy just from the fact that before you lift the wall you knew that the particle numbers were exactly N, even if that entropy is subextensive. Wouldn't that mean that when you lower the wall, you reduce the entropy a tiny subextensive amount, by preventing mixing of the right and left half? Even if the entropy decrease is tiny, it still violates the second law.
There is no entropy decrease, because when you lower the barrier, you don't know how many molecules are on the left and how many are on the right. If you add the entropy of ignorance to the entropy of the lowered wall system, it exactly removes the subextensive entropy loss. If you try to find out how many molecules are on the right vs how many are on the left, you produce more entropy in the process of learning the answer than you gain from the knowledge.
The entropy change should be zero – and essentially is zero, in the correct theory that takes the indistinguishability into account – because the thin membrane doesn't materially change the system and carries a tiny entropy by itself. The first reason is enough: the removal of the membrane is a reversible process – one may add the membrane back – so the entropy has to be zero. An entropy can't increase during a reversible process because it would decrease when the process is reversed – and that would violate the second law of thermodynamics.
In other words, the self-evident reversibility of the unphysical membrane means that $\delta S = \delta Q/T$ where $\delta Q$ is the heat flowing to the system – but it's clearly zero.
The paradox is removed when the indinguishability of the particles is appreciated. The calculable entropy change is zero, as expected. In some sense, we are implicitly assuming that the molecules are indistinguishable everywhere above. If the molecules carried some passports, they could have a Canadian and American passport in the volume $V_1,V_2$, respectively, which would be a very special state (none of the molecules is abroad) while the number of states would be increased because each molecule may be either in its own country/volume or abroad. This is indeed why the wrong classical calculation claims that the entropy would increase.
However, this prediction may be extracted even if the initial total volume $V_1+V_2$ is actually perfectly mixed before the membrane is added.
Best Answer
Yes, it works without any problems. I’ll just add that you can do it all in one go by modifying the expression of your entropy: $$ S =nc_v\ln(T/T_0)+nR\ln\left(\frac{V/n}{ V_0/n_0}\right)+ns_0 $$ with a reference state being marked $0$. The initial entropy is the sum of the entropies of the two systems with $n_1,n_2$ and the final is with $n$. It is mathematically equivalent but you don’t need to single out the entropy variation due to mixing.
This new form of entropy is generally preferable as it is extensive and solves Gibb’s paradox. It isn’t incompatible with your expression, because yours was derived assuming a fixed $n$, so it is defined up to an additive function of $n$. Furthermore, you can derive this new formula from statistical mechanics, and is more closely related to what chemists use in real life. Hope this helps and tell me if you find some mistakes.