Andrew Lenchewski, the creator of “Royal Pains,” is a Roslyn native who discovered in his native soil the inspiration for a much-beloved and soon-to-conclude series that was filmed in its entirety here (and at the Broadway Stages in Brooklyn). We spoke recently — via email — about the series, which returns for its eighth and final season Wednesday night at 10 on USA.

Why is the show ending now — it’s still doing well and there remains a big fan base out there?

ReviewSunny start to last season of LI-set ‘Royal Pains'PHOTOS'Royal Pains' LI filming localesPhotosWe're famous! Long Island in pop culture

Just for context, no series on USA Network (and few series on cable in general) have ever run longer than 8 seasons. So for me, the focus has been not on the show’s conclusion, but rather on its blessed longevity. The studio and network gave us the time and opportunity to complete the storytelling on our own terms, and I’ll be eternally grateful for that.

What was your favorite episode over the past seven seasons (and why)?

advertisement | advertise on newsday

I have two, both from our second season: episode 207, “Comfort’s Overrated”; and episode 218 (season finale), “Listen to the Music.” And I love them both for the same reason — they represent the show firing on all cylinders at once. Exciting medical stories, emotional character drama balanced by great comedy, wonderful performances, beautiful locations, and music to complement it all beautifully. I’m so especially proud of those two episodes.

Where was your favorite place to shoot on LI?

@Newsday

Of course, shooting in Roslyn, my hometown, was a dream come true. Shooting something in your hometown is every screenwriter’s dream come true. I also loved our Gold Coast estates and castles — Oheka, Inisfada (RIP), Sands Point Preserve, Old Westbury Gardens, etc. — which I had drooled over when I was growing up. But at the end of the day, there was nothing like shooting in the actual Hamptons. As successful as I think we were, in doubling Bayville for Bridgehampton, there really is no replicating the Hamptons. That’s what makes it so special. I would’ve wanted to shoot every single moment of the series there, if we could afford to spend half our time and budget sitting in traffic on the L.I.E. and Route 27.

Any special — or unusual/shocking/interesting/fun — memories of shooting on LI?

Since the beginning of the series, it was our dream to get Billy Joel to do a cameo. But we were always told he was unavailable. And yet, almost every time we shot in Oyster Bay, we’d come back to base camp (where all the trailers are parked) after wrapping the day’s shooting, and our Teamsters would say, “You guys missed Billy — he came by to say hello again!” Billy, if you’re out there and you’re listening, the show is over now — you won!

advertisement | advertise on newsday

No spoilers, but I am assuming the finale will have some tears: You shooting for a bittersweet wrap or a joyful one?

It certainly was a bittersweet ending, both for the characters and the people who made the show. We’d spent eight years together, and had truly formed a family. But the series had run its course, and everyone embraced that. Ultimately, all that matters now is that our very loyal audience feels rewarded, by the end of this journey that they’ve let us take them on.

What’s next for you?

We actually finished shooting “Royal Pains” last fall, so I’ve had several months to catch up on eight years’ worth of lost sleep, which has been nice. But I’m excited to move on to new opportunities. I’m developing a couple of new shows for USA, one of which is set on the Yale campus in the late 1960s. One of my partners on the project is Rob Reiner, which has been pretty surreal, because he’s truly one of my all-time cinema heroes. If we’re lucky enough to shoot the pilot, I can only hope that we’ll be shooting some of our campus scenes at LIU Post. And then I’ll just have to come up with an excuse to send a bunch of Ivy League hippies to East Hampton.