Two weeks before Election Day, President Obama visited Jay Leno on NBC’s “Tonight” show to tell Halloween trick-or-treaters that they can expect to get candy if they knock on the White House door — adding that anyone from Ohio can expect extra-large Hershey bars.

Leno asked the president what the deal is between him and real-estate mogul Donald Trump — who stars on NBC’s “Celebrity Apprentice.”

Earlier Wednesday, Trump offered to make a $5 million contribution to Obama’s charity of choice if the president would release his college transcripts and passport records. “Frankly, it’s a check that I very much want to write,” Trump said in a YouTube video. (Trump has questioned whether Obama’s birth certificate issued by the state of Hawaii is legitimate; the White House subsequently released the long-form copy of Obama’s birth certificate.)

Obama told Leno that the beef dates back to when he and Trump were growing up in Kenya.

“We had constant run-ins on the soccer field,” Obama joked. “He wasn’t very good and resented it. When we finally moved to America, I thought it would be over.”

Leno asked the president what the deal is between him and real-estate mogul Donald Trump. (Pablo Martinez Monsivais/AP)

It was Obama’s fifth visit to Leno’s show — his third as president. In 2009, the two men made TV history when Obama became the first sitting American president to appear on a late-night talk show. That visit attracted more than 14 million viewers.

Obama no doubt hoped Wednesday’s visit would attract a similar crowd.

Discovery’s ‘White House’

Has Discovery Channel decided how the presidential election is going to shake out?

The Silver Spring-based network announced Wednesday that it will broadcast a new documentary Sunday called “Flipping the White House,” in which former staffers discuss what it’s like to transform the White House when one president leaves and another moves in.

“When a U.S. President is sworn into office at high noon on inauguration day . . . [a] hand-picked and highly trained team is tasked with transitioning the old administration out as the new administration moves in — all in less than six hours,” Discovery said Wednesday.

“The outgoing president exits the home on inauguration day, and the incoming president enters the home complete with pictures on the walls, books on the shelves, and socks in the drawers just a few hours later,” Discovery added.

“Flipping the White House” will feature interviews with James Baker, chief of staff for President Ronald Reagan; Mack McLarty, chief of staff for President Bill Clinton; President George W. Bush’s adviser Karen Hughes; and former vice president Dan Quayle.

Also interviewed: Desiree Rogers, former White House social secretary for the Obamas, and Karl Rove, senior adviser and deputy chief of staff for President Bush.

Rove is better known these days as co-founder of American Crossroads. That super-PAC’s $12.6 million ad buy made it possible for those Clint Eastwood political ads — in which the actor/director indicts Obama’s presidency as a failure and urges people to vote Obama out of the White House, warning: “There’s not much time left, and the future of our country is at stake” — to begin airing in Colorado, Florida, Iowa, Nevada, New Hampshire, Ohio and Virginia.

In one of those happy coincidences, the ad began running Wednesday, which is the same day that Discovery announced its White House flipping special about, Discovery said, “a race against time before the new President of the United States and family cross the threshold to begin a new page in history.”

More for HBO from Oprah

Oprah Winfrey is developing a drama series for HBO about a wealthy academic who becomes the first black president . . . of a prestigious liberal arts college.

The guy and his family are thrust into national headlines, forcing them to present an idyllic public facade, according to the Hollywood Reporter, which first reported the series in development — part of a long-term deal Oprah/Harpo signed back in 2008 to develop series, documentaries, TV movies and miniseries for HBO.

Best we can tell, the pay cable network has not telecast anything out of that deal, although there have been many Oprah/Harpo projects doled out to the trade papers as “high priority” at HBO.

That includes one about a women who leaves her seemingly perfect marriage and kids in Santa Monica to indulge in secret fantasies in “the underbelly of Los Angeles.”

Another is based on the true story of a poor Baltimore mother who died of cervical cancer in 1951 and whose cells were removed by John Hopkins doctors — allegedly without her family’s knowledge — and used to develop significant breakthroughs in medical research.

Yet another is about a brothel in war-torn Congo, and there is a seven-hour miniseries adaptation of the book trilogy “America in the King Years.”

Before the HBO deal, Oprah and Harpo had a close 11-year relationship with ABC, where they made such notable movies/miniseries as “Tuesdays With Morrie” and “Their Eyes Were Watching God.”

Fox’s ‘The Following’

At Fox, fingers are crossed that its highly anticipated Kevin Bacon thriller, “The Following,” will take a bite out of NBC’s “The Voice” when the show debuts Jan. 21.

Ad Age reports that Madison Avenue is so atwitter about this show — in which ex-FBI agent Bacon tries to recapture serial killer James Purefoy, who has slipped his collar and is now recruiting serial killer interns to do his heavy lifting — that they happily forked over about $200,000 per 30-second spot in the series.

That makes “The Following” — from Kevin Williamson of “Scream” and “Dawson’s Creek” fame — the most expensive new series this season.

In advance of “The Following” unveiling, Fox will debut “American Idol: Nicki Minaj” on Jan. 16-17 — no doubt to jam those two episodes of the singing competition with “The Following” promos, trailers, Kevin Bacon sightings, blah, blah, blah.

Meanwhile, Kiefer Sutherland’s “Touch,” which was to have debuted this Friday — as part of the network’s November “sweep” programming push — will instead debut Feb. 1 and be part of the network’s sweep programming push then, Fox announced.

This season, Kiefer’s single dad Martin “If Only I’d Paid More Attention in Algebra” Bohm and numbers-genius son Jake have moved from New York to Los Angeles, where they find themselves at the center of a global conspiracy involving a mother in search of her teenage daughter — who is also a mathematical genius, like Jake.

Also figuring into the equation (Get it? Equation? I got a million of ’em!) is a religious zealot overcome with the urge to bump off mathematical geniuses.