Extremal Problems in Number Theory