We consider Jacobi matrices J with bn ∈ R on the diagonal, an > 0 on the next two diagonals, and with spectral measure dnx=n' xdx+dn singx . In particular, we are interested in compact perturbations of the free matrix J0, that is, such that a n → 1 and bn → 0. We study the Case sum rules for such matrices. These are trace formulae relating sums involving the an's and bn's on one side and certain quantities in terms of n on the other. We establish situations where the sum rules are valid, extending results of Case and Killip-Simon.;The matrix J is said to satisfy the Szego&huml; condition whenever the integral 0p ln&sqbl0;n'2cos q&sqbr0;dq, which appears in the sum rules, is finite. Applications of our results include an extension of Shohat's classification of certain Jacobi matrices satisfying the Szego&huml; condition to cases with an infinite point spectrum, and a proof that if n(an - 1) → alpha, nbn → beta, and 2alpha < |beta|, then the Szego&huml; condition fails. Related to this, we resolve a conjecture by Askey on the Szego&huml; condition for Jacobi matrices which are Coulomb perturbations of J0. More generally, we prove that if an≡1+ang +O&parl0;n-1-3&parr0;, bn≡bng +O&parl0;n-1-3&parr0; with 0 0, then the Szego&huml; condition is satisfied if and only if 2alpha ≥ |beta|. |