Love Is in the N2-O2-Ar-CO2-Ne-He-CH4

"Love Is in the N2-O2-Ar-CO2-Ne-He-CH4" is the thirteenth episode of the twenty-seventh season of the animated television series "The Simpsons", and the 587th episode of the series overall. It aired in the United States on Fox on February 14, 2016.
This episode was dedicated to the memory of Julie Kavner's father David Kavner, who died on February 1, 2016.
Plot.
Mr. Smithers reminds Mr. Burns about Valentine's Day and tries to convince him to let the employees leave early to stay with their loved ones. Burns refuses, but Smithers convinces him to host a Sweethearts Dance. While enjoying the party with Marge, Homer gets a phone call from Grampa saying that he is alone and scared that a cat who can smell death is staring at him.
Homer and Marge decide to visit Grampa, spending the rest of Valentine's Day with him. At the Retirement Castle, a nurse gives a pill to the elders, making them hallucinate and start dancing with the ghosts of late loved ones including Grampa deceased wife Mona. Marge thinks it is not fair to do that to the old folks and decides to do something about it.
Meanwhile at the party, Professor Frink is alone because he is not good in getting a girlfriend. The next day, Homer discovers him sleeping in one of the Nuclear Plant's rooms. Frink confesses that Valentine's Day is hard for people like him. Homer explains that love is a matter of trial and error. Frink gets the idea of determining what women like in a man and using science to become that person. Frink replaces his glasses with invisible blue contact lenses and uses shoe lifts for him to look taller, but even a droid that he programmed to say "yes" still thinks he is not attractive. Homer suggests it could be because of his voice, so Frink decides to use a chip under his tongue to make his voice more attractive.
To test his new self, Frink goes to a yoga class. He manages to impress all the girls in there and eventually begins an active dating life, but he soon notices that he cannot handle his new life and decides to hide inside Moe's Tavern where he realizes that most men there are lonely. He brings all the women to Springfield Planetarium, but instead of telling which woman he has chosen to be his girlfriend, he pairs them up with the lonely men of Springfield and decides to go back to his life as a single scientist. It is only then that the droid begins to see him as attractive while watching the stars, only to get interrupted by her mother as Frink wonders why he built the robot's mother.
At the Simpsons' house, Marge discovers that Bart is taking advantage of the old people's hallucinations to win money on gambling. She takes them back to the Retirement Castle only to discover that the nurse gives powerful drugs to them only to ease her job and Marge manages to convince the nurse to stop medicating them.
The next day, Marge realizes that the elders are extremely depressed. The nurse says that she hid the drugs in the library, but Grampa finds the pills and takes them so he can start hallucinating and win Mona back, running out of the Retirement Castle and into a 1940s-esque world. During his hallucination, Marge, Bart and Lisa convince Grampa to leave the past behind and live in the present, where there are people that still love him. He says goodbye to Mona before waking up in a mechanic's garage, having somehow wandered there during his hallucination.
In the final scene, Marge experiences the hallucinations and asks Grampa why they are there again. He explains that he flushed the drugs down the toilet, but suspects that the drugs may have entered Springfield's water system. Marge thinks they should wake up, but is distracted by Homer calling attention to Dean Martin being there.
Reception.
"Love Is in the N2-O2-Ar-CO2-Ne-He-CH4" received a 1.3 rating and was watched by 2.89 million viewers, making it Fox's highest rated show of the night.
Dennis Perkins of "The A.V. Club" gave the episode a B-, stating that the episode, "This episode (fine, 'Love Is in the N2-O2-Ar-CO2-Ne-He-CH4') is a moderately amusing mush of good and bad ideas making up two half-realized stories. I found things to like in both, and wished each were better, and longer."