A new algorithm is introduced for analyzing gene-duplication-independent (orthologous) and gene-duplication-dependent amino acid sequence similarities between proteins of different species. It is based on the calculation of an autocorrelation function D(x) as a Fourier series analogous to that used in crystal analysis by x-ray diffraction. The primary structure of the protein is decomposed into "homopolypeptide-defective sequences" containing identical or similar amino acid residues and vacancies corresponding to the missing amino acid residues. The Fourier transforms F(h) simulating the diffraction patterns of defective linear gratings corresponding to the defective homopolypeptide sequences are calculated. The squared F(h) values are then used as coefficients of Fourier series corresponding to the autocorrelation functions D(x). A peak of D(x) corresponds to a vector of length x, which is the distance between two identical amino acid residues. It is pointed out that optical diffraction methods, instead of computer methods, would also be useful. It is shown through a number of examples that this method allows satisfactory pattern recognition of homologies and internal duplications of an initial segment of the polypeptide chain. In the latter case the value of the above method may be seen from the fact that it detects repeated duplications in proteins such as spinach ferredoxin and myoglobin, for which other methods had either failed or given inconclusive results. The above approach appears most promising for studies of molecular evolution and structure-sequence correlations.