Analogies between finite-dimensional irreducible representations of SO(2n) and infinite-dimensional irreducible representations of Sp(2n,R). I. Characters and products