Bill Clinton was a social animal as president, as he and Hillary Rodham Clinton kept up a steady round of parties. For Mr. Obama, the late-night gatherings are a new development. Although dinner at 6:30 with his wife, Michelle, and their two daughters has long been sacrosanct, the president recently said that as Malia, 16, and Sasha, 13, grew up and went out more with friends, he was freer to fill his own social calendar. He joked soon after his re-election that he was getting “lonely in this big house,” and that he might soon be calling around for company.

One Saturday night in May, Mr. Obama was up well past midnight at the White House for a dinner that included Ken Burns, the documentary filmmaker, and his wife, Julie; Anne Wojcicki, the chief executive and a co-founder of the personal genome testing company 23andMe, who brought her sister, Susan, the chief executive of YouTube; and Tom Steyer, the billionaire hedge fund manager and Democratic donor. Mrs. Obama was also there, but she was not on the trip to Rome. The dinner there was first reported by Politico.

Image The architect Renzo Piano in 2012. Mr. Piano was one of several notable Italians invited to dine with the president in Rome. Credit... Gonzalo Fuentes/Reuters

Previous dinners at the White House have drawn varied celebrities, including Will Smith and Jada Pinkett Smith, Morgan Freeman and Bono. Many of the guests — including the Smiths and Mr. Freeman, as well as Anne Wojcicki — have been financial supporters of Mr. Obama’s campaigns.

In Rome in March, Mr. Piano said, the president seemed happy to talk about something other than politics and current events. “I think he was refreshed to sit down in a beautiful place, with good food, and talking with serenity about important things,” Mr. Piano said. He recalled that Mr. Obama, who once had dreams of becoming an architect, had many questions about Mr. Piano’s work.

“It was a real curiosity of a real man who was trying to explore how things happen,” Mr. Piano said.

The dinners often carry over into Mr. Obama’s day job — and his fund-raising. At a White House meeting on working families last month, Mr. Obama included Ms. Wojcicki — who has two young children with her husband, the Google co-founder Sergey Brin, from whom she is separated — in a discussion of workplace policies with other chief executives. Less than two weeks before, Ms. Wojcicki hosted a technology forum and fund-raiser for the Democratic National Committee at her home in California, which was attended by Mr. Obama and 25 guests who paid $34,200 each.