It would be hard to top Harriton High School senior Samuel Weissman in a “what I did on my summer vacation” essay: working in a lab at the University of Pennsylvania, looking for new ways to rid the body of the HIV virus.

The Merion 17-year-old’s work ethic — and an obsessive curiosity about biology that started in third grade — paid huge dividends this week as he took second place, and a $175,000 prize, at the Regeneron Science Talent Search, the nation’s most prestigious science and math contest for high school seniors.

Weissman — who on Tuesday received the award, formerly sponsored by Westinghouse, at a ceremony in Washington — said he was awed just to be on stage with the other finalists, including $250,000, first-place winner Ana Humphrey of Alexandria, Va., who studied planets outside the solar system.

“When I got called, it dawned on me how amazing it was to be on the same stage as all these really brilliant people,” Weissman said Wednesday. He said he’s so excited about his research that he plans to spend a “gap year” working full time at the Penn lab before entering college.

“I think my research is on a hot track right now,” Weissman said. His preliminary discoveries on how the HIV virus interacts with cancer genes were “just published in the journal, Nature Communications, [with two researchers] and I think there’s a lot more to be found,” he added.

Each year, about 2,000 students submit original research to the nation’s oldest math and science contest, with40 selected to be honored and a total of $1.8 million in prize money awarded.

Una O’Doherty, the Penn professor of pathology and laboratory medicine who runs the lab, said that it was Weissman who pushed to continue a nearly abandoned research project and that without his efforts, “I don’t think we would have made that discovery.”

For Weissman, the big science prize was another milestone on the odyssey that began in grade school when his mother — a behavioral psychologist, as is his father — was inspired by his curiosity to hand him the biology textbook that she’d used in college.

“I loved it,” he recalled. “I didn’t understand it all back then, but I came to really be interested in how the immune system works, and how we are able to fight off bacteria and viruses and everything that is trying to hurt us in the environment.”

“He’s very self-effacing [and] self-motivated,” said his mother, Beth Rosenwasser.. “I am not a tiger mom at all; he loves what he does.”

In seventh grade, Weissman had a chance encounter with O’Doherty because his brother played Dungeons and Dragons with her son. The precocious middle schooler asked to visit her Penn lab for a day. By that summer, he was working there, although at first it was mostly just getting coffee.

But he absorbed enough from a postdoctoral researcher that when the researcher left Penn, Weissman asked to continue his project. For the next three years while attending school, the teenager worked at Penn two days a week — one afternoon after school and one day on the weekend, and eventually for pay.

Weissman’s research centered on how HIV-infected cells — despite huge medical advances since the 1980s — still form a reservoir that remains in the body and resists treatment. Using state-of-the-art equipment at the Penn lab, the budding scientist was able to better study HIV’s DNA by assembling an entire genome, and in doing so gained insights into the persistence of the virus.

His research showed that through the process known as clonal expansion, the reservoirs of HIV in the body were able to grow even as infected cells were being killed — a discovery that could lead to better treatment.

Indeed, Weissman’s excitement over what comes next — studying how the virus interacts directly with cancer genes — helped him persuade his parents, who were “initially hesitant,” to agree to his working in the lab full time for a year before he begins college. He said he ultimately wants to become a physician as well as a researcher because “I want to be able to not just develop stuff in the lab, but to touch the lives of everyday patients.”

There are, of course, other things besides science in the teenager’s life. After his grandfather learned to play the saxophone at age 65, Weissman learned it, too, and joined Harriton’s jazz band. He has a twin brother, Ben, who likes politics more than science, and he also has a sense of humor.

“I can buy seven cars for $25,000 each,” Weissman said of the Regeneron prize, “or save it for college … which is what I’m going to do.”