Comedian Larry David's impression of Sen. Bernie Sanders (I., Vt.) became a "Saturday Night Live" favorite during the presidential primary, and now a DNA test shows there's more than just a resemblance between the two.

David and Sanders share identical DNA in three chromosomes, which led Henry Louis Gates Jr. of PBS's "Finding Your Roots" to conclude that they are related, the Associated Press reports. The show explores American history by examining the lives and even DNA of celebrity guests, and the episode that revealed the two men are related will air in October.

"I was very happy about that," David said on a tour promoting the return of his show "Curb Your Enthusiasm" on HBO. "I thought there must have been some connection."

Gates said that they "couldn't have scripted" the discovery. David revealed last week to critics that he just learned he was Sanders' "third cousin or something."

Both men are Jewish and grew up in Brooklyn around the same time, where they developed similar accents. David said he had an easy time learning to "talk like Bernie" as he developed the impression that became a staple on "Saturday Night Live."