David Quinn spent the first month of his first season as Rangers coach searching for some formula that would work to provide chemistry — and goals — for his young, rebuilding team. He mixed and matched his players, trying all kinds of inventive line combinations, new ones just about every game.

The Rangers have had some success during the last couple of weeks, winning four straight games and earning at least a point in six straight (5-0-1), and Quinn finally may have found what he was looking for.

“I’d love to have some continuity with our lines, but when someone doesn’t play well — when one guy sits, there’s a domino effect,’’ Quinn said after the Rangers beat the Blue Jackets, 5-4, in a shootout Saturday to finish off a 1-0-1 weekend trip. “But I think we’ve found a little bit of continuity and a little bit of line combinations that we like.’’

Right now, a lot of Rangers forwards seem to be playing well at the same time.

The third line of 20-year-old rookie Brett Howden at center between Jimmy Vesey and Jesper Fast seems to have been locked in for a while, and Vesey had a huge game in Columbus with a goal and an assist before scoring the shootout winner.

In two games without Mats Zuccarello (groin strain), Pavel Buchnevich has looked like a perfect fit on the right side of the first line, with center Mika Zibanejad and left wing Vlad Namestnikov. Buchnevich also had a goal and an assist against the Blue Jackets.

Subscribe to Newsday’s sports newsletter

Receive stories, photos and videos about your favorite New York teams plus national sports news and events.

Quinn hopes Zuccarello will be back for Monday’s home game against the Vancouver Canucks, which will necessitate more line-tweaking. Zuccarello had been on the top line, but it would be hard to move Buchnevich out of that spot now. The 23-year-old Russian has five goals and nine assists in 14 games and has played well since his return to the lineup after a two-game benching. He has two goals and two assists in the four games since his return to the lineup.

“People go crazy when a player sits,’’ Quinn said somewhat incredulously while talking about Buchnevich. “No matter who you are, no matter how long you’ve been in the league, where in life do you get to do something if you’re not doing it well? So I wasn’t surprised with how he’s responded, and he’s a 23-year-old kid who’s incredibly talented, and we love him as a player and as a kid, and I’m just happy for him that he’s been productive offensively.’’

Assuming Quinn keeps Buchnevich with Zibanejad, his longtime center, the logical spot for Zuccarello, if he returns, would seem to be on the second line. He would join red-hot center Kevin Hayes (two assists against Columbus and six assists in the last three games) and left wing Chris Kreider (team-high eight goals, including one against Columbus).