This is one of those topics I find interesting so I could go on about it for hours. I was going to save you guys from it but then Ismurphy posted his explanation and I can't help myself anymore so here we go.
Engine vibrations are have three primary sources. A 4 stroke engine only produces power every 180 degrees. The flywheel absorbs power during the power stroke and releases it helping the engine coast through the others. The more power strokes the smaller the amount of time the engine needs to coast, the smaller the required flywheel and the smoother the power delivery. Working a four cylinder hard you can feel the gaps in the power strokes, a V8 feels like butter, and a V12's power delivery is almost as smooth as an electric motor. It's also important that the firing orders be evenly spaced otherwise another vibration is generated, pull one spark plug wire from your car and see how smooth it is. A two cylinder should fire every 360 degrees, a 3 cylinder every 240 degrees, a four every 180 degrees, ect.
Just as important is the primary balance. These are the forces that occur in phase (at the same crank angle) as the crank throw. Picture a single cylinder engine. As the crank rotates clockwise from top dead center to 90 degrees there are two forces generated. One is the reaction force from the piston and rod moving down and the other is a vertical and horizontal force due to the downward and rightward motion of the crank throw. So the vibrations from an unbalanced single cylinder engine would be a circular force combined and up and down motion.
These forces would be severe in anything anything rotating faster than 100rpm or so. So the solution used since the days of steam is to put weights on the crankshaft opposite the crank throw. With these you can completely cancel out the force due to the crank throws and big ends. However the piston and rod are moving vertically and since the counterweights are rotating trying to fully balance the piston and rod would create a horizontal force of similar magnitude to the vertical one you just eliminated. Instead the crankshaft weights in single cylinder engines are a compromise, they're heavier than needed to balance the crankshaft but only partially balance the piston. Compared with an unbalanced engine the vibrations are much smaller but both are still present. This combined with the single power stroke causes single cylinder engines to be paint shakers.
Next is a two cylinder engine. These can be built in many configurations. We'll start with the 90 degree Vee Twin. This is two cylinders set at a 90 degree angle sharing a crank throw. The crankshaft weights can now fully balance both the piston forces and the crankshaft throws since the horizontal force that would otherwise be unbalanced is now balanced by the second piston. The engine can have almost perfect primary balance except for the fact that the cylinders are usually not perfectly inline with each other so there's a slight rocking motion. Unfortunately the firing order is uneven and fully balancing the pistons makes for a heavy crank so they tend to change speeds slower (most often used in motorcycles where this can be important).
Inline 2's can use either a 360 degree crank (both crank throws are at the same angle) or a 180 degree crank (crank throws opposite each other). The 360 degree crank has an even firing order but with both pistons moving up and down in unison it vibrates like two single cylinder engines coupled together. The advantage over a single cylinder then is the two power strokes smoothing out the power delivery. A 180 degree crank does not have an even firing order but since the pistons are moving opposite each they cancel out each others forces and the crank weights can be sized just to balance the crank throws and rod ends.
There's a problem though. Due to a quirk of kinematics the velocities of the two pistons moving opposite each other aren't
exactly matched. One piston is always moving faster than the other and a secondary vertical vibration at twice the crankshaft speed is created. The effect is the vibration tried to rock the engine about a point between the two cylinders. This vibration usually isn't enough to be a problem at low rpms but as engine speeds increase the vibration gets worse.
Flat twins manage to avoid this problem. Their construction is like an inline twin with the cylinders and crank throws 180 degrees apart. Since the cylinders are opposite each other the pistons difference in piston velocities is perfectly matched. However it suffers from a rocking vibration because the cylinders aren't inline similar to the 90 degree Vee Twin. Flat fours share this problem but but any flat engine 6 cylinders and larger is in perfect balance.
Nearly all inline 3 cylinder engines use 3 evenly spaced crank throws, each throw is 120 degrees apart from the next. This causes an interesting effect. The vertical force generated by one piston exactly canceled out by the sum of the other two. With the first cylinder at bottom dead center, the second is 50 degrees from top dead center moving up, and the third is 50 degrees past top dead center moving down. As the second piston gets closer to top dead center it's force decreases. At the same time the first piston begins rising and the force it generates matches the decreased force from the 2nd and the increased force from the third. The result is nearly no secondary vibrations and almost perfect primary balance. The only unbalance comes from the fact that two pistons are moving up or down at the same time so the engine rocks from end to end slightly. Any engine with evenly space crank throws for each cylinder exhibits similar behavior. Inline 3, 5, and 7s, cross plane (American) V8s, Yamaha's cross plane craftshaft inline 4 but any inline engine with an odd number of cylinders will exhibit the rocking vibration.
Nearly all lnline four cylinder engines use a 180 degree crank (front two cylinder at same angle, back two opposite them) and behave exactly like a 180 degree crank inline twin. As mentioned above there are a few 4 cylinder engines with 90 degree (cross plane) cranks but these don't have an even firing order. An inline 6 behaves like two inline 3's bolted together and along with engines larger than an 5 cylinder have over lap in the firing order which helps make it even smoother. In the 6 the rocking motion is canceled out by the two 3 cylinder pairs so they are in perfect balance. The CBX1000 is so smooth you can set a quarter on the seat while it's idling and it won't move. A V12 is also in perfect balance because it's like two inline 6's bolted together in a 60 degree V.
The classic American V8 uses four crank throws with pairs of pistons sharing throws and behaves like 4 sets of 90 degree Vee Twins. It's in perfect balance and has an even firing order. It's only disadvantage is a heavy crankshaft and the firing order between banks is uneven (not a problem for balance but makes exhaust design interesting, this is also where the V8 rumble comes from). European and racing V8's still have pairs of cylinders sharing throws but they are now 180 degrees apart and behave like two inline 4s coupled together. They're used because they're lighter and exhaust design is simpler than their cross plane cousins. There are dozens of other interesting combinations and all have unique characteristics but those are the most common minus the V6 which is a complicated animal.
Nearly all of these vibrations can be targeted and balanced with balance shafts at the cost of increased complexity and weight. A balance shaft is simply a small shaft with an eccentric weight driven in phase with the crank and placed such that it cancels the desired vibration. My 450 Nighthawk motorcycle uses an inline twin with a 360 degree crankshaft and a single balance shaft behind the cylinders and above the crank. With an even firing order and the worst of the vibrations canceled by the balance shaft it's quite smooth even at 9000rpm. Balance shafts didn't start seeing common use til after the 50s when engine rpms (especially 4 cylinders) began increasing and consumers demanded increased engine smoothness. Today nearly all inline 4s use two balance shafts turning in opposite directions to cancel out the secondary vibrations and many other engines make use of them.
So looooooooooong story short a three cylinder will generally be a smoother than an inline 4 without balance shafts at speed despite the larger firing gap but the final product depends on a lot of things. Smoothness of combustion (direct injection diesels lose here), design rpm, how the engine is mounted, how well the production parts match the math and are balanced, a bunch of things. The Ford 3.3L inline 3 direct injection diesel used in the 4500 vibrates a fair bit at all rpms despite topping out at about 2000. The 2L inline 4 gas engine in the 8n is fairly smooth at most rpms and tops out at the same. So as interesting as that all is it's only one part of a complicated picture.
Sorry for the wall of text, I hope at least that was interesting to someone.