The Big Bang Theory Season 9 Episode 18
The Application Deterioration
Sheldon, Leonard, and Howard meet with a patent attorney to try and get a patent for their new idea, but learn that rules from their university would keep them from earning most of the profits.
Raj visits Penny, Amy, and Bernadette for advice about a gift he received from Emily. Amy learns that the gift is worth more than five-hundred dollars, and the girls wonder if Emily is trying to win Raj back.
Sheldon and Leonard come up with a way to keep Howard on the partnership for the patent, and Sheldon drafts a contract. Bernadette is skeptical, and tries to talk Howard out of it.
Raj calls the girl he met at the comic book store. Meanwhile, he's on his way to see Emily.
After Howard expresses his concerns, Penny suggests they add a clause to the contract that Sheldon can't make fun of Howard.
Everyone looks over the contract, which Bernadette realizes also has a clause that a portion of Sheldon's profits will go toward a scholarship fund for their child.
After a back and forth of phone calls between Emily and Claire, Raj decides to go see Emily as a friend, and ends up sleeping with her.