If you're going for maximum lifetime, you should make sure to prime all cuts with an oil based primer. If the lumber didn't come pre-primed, then prime all surfaces with an oil based primer. If you use a fast drying primer, you can get a coat of paint over the cut before you install it. I wouldn't worry about using a "sealant" between the boards. I'm guessing you mean "caulking" when you say sealant.
You should install the trim, and then caulk the seam between the two pieces of lumber after the trim is on the wall. Let it dry over night, and then apply two coats of paint over everything, including any caulking that you've applied. One mistake I see fairly often is that people will caulk something to try and keep water from getting in, but then they don't paint the caulking. The sun dries it up, it shrinks just enough for water to get behind it, and then the caulking has the opposite effect. It actually traps moisture behind itself, slowly rotting the joint that it's meant to protect!
The best thing you can do for yourself in all of this has nothing to do with paint. Make sure you buy solid lumber. Do not ever use finger-jointed pine in an exterior application. I have seen so much rot over the years, because people use finger-jointed lumber in high moisture environments, and it just falls apart in a decade or less, even when it's been painted. That stuff is for interior use only!