When knocking on someone's door, Sheldon follows this slightly obsessive pattern:
- knock-knock-knock "name", knock-knock-knock "name", knock-knock-knock "name"
In the flashback episode, Sheldon uses the knock pattern when he interrupts Leonard and Joyce Kim, implying that he has been using it for years. This is a minor inconsistency since he wasn't using it at the beginning of the series. For example, in Hamburger Postulate, he runs across the hall and simply knocks rapidly on Penny's door to ask about semiotics. The first time he uses a variation of what will become his signature knock is in The Loobenfeld Decay (episode 10 of the first season) when he knocks on Leonard's door in the middle of the night, but in that case he knocks four times before saying Leonard's name. During that episode, he also repeats the knocking pattern over and over and over, not just three times, and uses it on Penny's door as well as Leonard's.
As time goes by, Sheldon uses his obsessive knock pattern most frequently on Penny's door. She tries to explain to him that it's a small apartment and he doesn't need to knock over and over, but he doesn't change his behaviour. She even points out that she waits on the other side of the door for him to finish his knocking pattern and he points out that he knows she does (he can see the shadow of her feet).
Penny eventually begins messing with him, in one case opening the door before he gets to his third knock and in another case knocking back in the same pattern.
Another notable knock moment is when Penny hollers for help after falling in the bathtub and Sheldon comes across the hall, knocking on each intervening door (0308).