The game you're thinking of is most likely Treasure Mountain!, at least that's what I remember.
It's a classic educational title where you ascend level by level by picking the right numbers, blending arcade fun with a bit of math practice.