Lloyd's theorem for perfect codes

Abstract We give another proof of Lloyd's theorem using homogeneous distance enumerators, and show that the same techniques will give similar theorems for more general types of codes. The theorem has been proved earlier by Delsarte and Lenstra. We thought it interesting that the result can be derived from some elementary polynomial manipulations. The methods and results herein should be considered as belonging to combinatorial coding theory, since it is not necessary to use the finite field approach to get them.