Let `epsilon`, r be the emf and internal resistance of each cell. When n cells be connected in series, then current in the circuit having external resistance R is
`I_(s)= (n epsilon)/(R+nr)`
When n cells are connected in parallel, the current in the circuit is
`I_(p)= (epsilon)/(R+r//n) = (n epsilon)/(nR+r)`
As `I_(s) = I_(p) so (n epsilon)/(R+nr)= (n epsilon)/(n R+n)`
or `R +nr= n R+r`
or `R (1-n)= r (1-n) or R=r`