For a given total number of identical cells with internal resistance, we inquire the series-parallel combination of the cells that yields the maximum current through a load resistor linked to the combination. The aspect ratio or shape factor (number of parallel strings/number of serial cells in each string) of cell combination for the maximum load current depends on the resistance ratio (internal resistance/load resistance). Here we provide a systematic, algebraically simple and efficient way to find the (discrete) 'spectrum' of the shape factor for the maximum load current as a piecewise-defined function of resistance ratio. In particular, we can get the spectrum by computer programming even when the total number of series-parallel combinations is large as in the case of the electric eel. Furthermore, using the spectrum, we obtain the maximum load current as a piecewise-defined function of resistance ratio. All taken together, this article would be beneficial to university teachers and students because (i) it provides them with pedagogically useful information on the series-parallel combination of identical cells, (ii) its whole process is algebraically easy enough to understand, and (iii) it gives them a good example of using a computer programming in physics education. In addition, it is also of practical importance as the scheme introduced herein can be applied to electric vehicles whose batteries have the pack-module-cell structure.