On the correspondence between differential equations and symmetry algebras