“I have to say, I’m so pleased to be able to host Peyton here at the White House before I left,” Mr. Obama said at a June 6 celebration for the Super Bowl champion Denver Broncos. He had already teased quarterback Peyton Manning about being in TV commercials for enough merchandise to “stock your whole household.”

One week earlier, Mr. Obama had welcomed the Villanova University men’s basketball team, which won the N.C.A.A. championship in “what may be the best title game of all time” — the president’s description of the Wildcats’ last-second victory over North Carolina. On Monday, he will host the Minnesota Lynx, the W.N.B.A. champions.

Above all, Mr. Obama is a basketball fan. He was a member of his high school team, and he continued playing until recently. On the return flight from a weekend visit to Yosemite National Park on June 19, Mr. Obama and his family remained on Air Force One until the end of the last game of the N.B.A. finals between the Golden State Warriors and the Cavaliers.

He scrimmaged with the University of North Carolina team during the 2008 campaign, and a Sports Illustrated writer recently produced a book, “The Audacity of Hoop,” about how basketball had been crucial to Mr. Obama’s maturation.

“I hung it up about two years ago,” Mr. Obama said in his talk with Mr. Lue. “You know, I had too many friends seeing that Achilles pop. Be in a boot for six months.”

At a ceremony in February to honor the Golden State Warriors, who won the N.B.A. crown last year, Mr. Obama said he could appreciate their talent.

“I don’t play anymore, but I still know a little bit about basketball, and this really is one of the best that we’ve ever seen,” he said of the Warriors.