for plane motion, links can have at most three degrees of freedom. (x/y movement, and z rotation)

the equation is derived from simple proofs by starting with a single link and adding more links

noting that each joint will remove degrees of freedom depending on the joint type.

revolute joints remove two degrees of freedom by preventing x/y movement but allowing z-rotation (so they only /allow/ one degree of freedom)

prismatic joints are the same >> so and so forth for all other joints

the poof is shown by example

e.g. if you start with one link it can have three degrees of freedom

(this equation assumes one of the links is fixed in space relative to something ('grounded')

so for a single fixed link, N=1, L=0,H=0 >> F=0

for two links, say with a revolute joint, the first link is fixed while the other is attached via a revolute joint; N=2, L=1, H=0 >> F= 1

this means that the mechanism (as a whole) will only be able to move in one degree of freedom (in this case rotation)

you can continue this down for more links

keep in mind this formula is not fool proof and does produce errors for unique link configurations (aka parallel bars in plane motion)

tl;d: the 3 is showing that all links have at most 3 degrees of freedom in planar motion, and the (n-1) is from the ground or 'fixed' linked