When an item is dropped into a hopper with enough downward velocity (dispensed from a dispenser 1 block above is enough), the hopper duplicates the item.
Additionally, any further items that are dropped into the hopper, that can stack with the first item, will not be duplicated.
Essentially, starting a new stack in the hopper is when the duplication occurs.
This causes any amount of items up to 63 to result in n+1 items.
However, 64 items causes a stack to be completed before the last item is dispensed. A new stack is made, causing another duplication, resulting in 66 items (n+2).
Presumably, this effect would cause 127 to 189 items to produce n+3 items, 190 to 252 items to produce n+4 items, and 253 to 315 items to produce n+5 items.
Linked issues
duplicates
Comments

Duplicate of MC-5998 , please use the search function to see if your bug has already been submitted. Currently over 40% of tickets are being closed as duplicate.