Knicks owner James Dolan had a brainstorm in late March, and it turned into Patrick Ewing representing the franchise on the lottery dais in Chicago on May 14.

According to team president Steve Mills, Dolan gave him a random phone call a few weeks ago that could turn Ewing into the good-luck charm that brings Zion Williamson to New York City.

“Actually Jim Dolan called me up and asked, ‘Who’s attending the lottery?’ ” Mills told The Post. “I said Scott [Perry, general manager], and I haven’t talked about it that much. He said, ‘I’m just making a suggestion. You can say no if you want to. But what about Patrick?’

“I said, ‘I think that’s a good idea.’ ”

The lottery offer sounded too good to pass up for the Knicks legend — the first-overall pick in 1985 after the franchise won the first NBA draft lottery. Ewing now is Georgetown’s head coach.

“I texted Patrick, asked him to give me a call,” Mills said. “He called me back that night. I told him what we’d be asking him to do, what we’d like him to consider. I said I’d love him to do it. He said, ‘Hopefully I can do it, but I have to make sure my scouting schedule doesn’t coincide with lottery day.’ I sent him information and timing. He came back and said, ‘I’d love to do it.’ ”

With the NBA’s worst record at 17-65, the Knicks will have a 14 percent chance of winning the lottery under its new format. They share the top odds with Phoenix and Cleveland. In years past, the team with the worst record had a 25 percent chance.

However, there are a couple of good omens. As The Post’s Mike Vaccaro has reported, the Knicks also had roughly a 14 percent chance of winning the Ewing lottery in 1985, when all seven non-playoff teams shared the same odds.

There is also another Ewing number theory floating about: If you take Ewing’s 33″ — his jersey number — plus the No. 1 pick, it’s been 34 years since “The Big Fella” was drafted by the Knicks.