Season 2, Episode 13 - The Friendship Algorithm
Aired January 19, 2009
Sheldon wants to use the university's grid computer for his research, but access to the computer is controlled by Barry Kripke who apparently favors his friends. Sheldon decides to befriend Kripke, but struggles from a lack of experience in making friends. Treating this like any other scientific inquiry, Sheldon studies up and develops a friendship algorithm.
Season 5, Episode 15 - The Friendship Contraction
Aired February 2, 2012
When Leonard grows tired of Sheldon's selfish demands, he terminates the roommate agreement and downgrades their friendship. Meanwhile, Wolowitz tries to pick his own astronaut nickname.
Season 7, Episode 17 - The Friendship Turbulence
Aired March 6, 2014
When a spat breaks out between Howard and Sheldon, Bernadette tries to bring peace to the group, leading Howard and Sheldon to fly to Texas together. Meanwhile, after Penny's car breaks down she wonders whether she'll have to get her job back at the Cheesecake Factory or take an embarrassing movie role. Raj seeks Amy's help in contacting a potential mate on an internet dating site.