A method is suggested for the calculation of the nonlinear susceptibility corresponding
to the generation of second and third optical harmonics in atomic gases. The method
is based on the use of the Green's function of an atomic optical electron in the
computation of the composite matrix elements. The results are given of a numerical
calculation of χ(–3ω;ω,ω,ω) and χ(–2ω;0,ω,ω) for hydrogen, alkali atoms, and inert
gases at the frequencies of ruby and neodymium laser radiations and their second
harmonics. A two-photon resonance in the generation of the third harmonics is
considered.