  The Casimir energy for the transverse oscillations of a piecewise uniform
closed string is calculated. The string consists of 2N pieces of equal length,
of alternating type I and type II material, and is taken to be relativistic in
the sense that the velocity of sound always equals the velocity of light. By
means of a new recursion formula we manage to calculate the Casimir energy for
arbitrary integers N. Agreement with results obtained in earlier works on the
string is found in all special cases. As basic regularization method we use the
contour integration method. As a check, agreement is found with results
obtained from the \zeta function method (the Hurwitz function) in the case of
low N (N = 1-4). The Casimir energy is generally negative, and the more so the
larger is the value of N. We illustrate the results graphically in some cases.
The generalization to finite temperature theory is also given.
