We introduce an invertible operation on finite sequences of positive integers and call it “kneading”. Kneading preserves three invariants of sequences — the parity of the length, the sum of the entries, and one we call the “alternant”. We provide a bijection between the set of sequences with alternant a and parity s and the set of Zagier-reduced indefinite binary quadratic forms with discrimina...