Differential equations and discrete mathematics