In papers, when should I spell a number (sixteen) and when I should write it using numerals (16)?
Depends on your purpose. The only rule which immediately comes to mind is to spell in words any number which occurs at the beginning of a sentence. Check what is stated in a manual of writing.
The only rule that I think is particularly important is not to use two sequential numbers in the same form. "Sixteen 2-liters", not "16 2-liters" or (worse) "Sixteen two-liters".
The only rule that really matters is "follow your style guide".
What about when I say "There are three main problems associated with blah blah"? It feels kinda wrong to have "3" there instead of "three".
Also I'm not sure there is a style guide.
Plenty of style guides are available. College bookstores, premium bookstores, high school English departments and their teachers (probably many but not all), some dictionaries. Other academic departments in institutions might also have a style guide.
Also, you might find a couple of interesting links to writing style in www.rbs0.com
Their guidelines seem pretty good, except for the hyphenation one (eg: twenty-eight instead of twenty eight. I hate that.)
Separate names with a comma.