If the number of LEDs (L) is known, then the number of pins (n) can be found from the equation: , the result being rounded up or down to the nearest whole number. Example: If L = 57, then √L = 7.549, and 1 + √L = 8.549; the nearest whole number to this is 9, so 9 pins are needed to drive 57 LEDs (9 pins could drive up to 72 LEDs, but 8 pins could drive only 56 LEDs at most). Origin of the (n2 − n)