LOS ANGELES >> The Dodgers messed up the formula. They had been winning without their starting pitchers going long. But this time, the offense came up short.

Rookie right-hander Ross Stripling gave the Dodgers just their third seven-inning start in the past 43 games. But he also gave up five runs and the Dodgers offense failed to provide the crucial ingredient, turning 12 hits into just one run in a 5-1 loss to the Pittsburgh Pirates on Friday night.

The Dodgers have scored just three runs in back-to-back losses since pulling into a first-place tie with the San Francisco Giants on Wednesday night. The Giants lost to the Baltimore Orioles, 5-2, in an interleague matchup Friday night, leaving the Dodgers one game back in the National League West.

“It was one of those games where nothing went our way,” Dodgers manager Dave Roberts said. “I don’t think it’s any indication of where we are right now, getting one run.”

Things certainly didn’t go Stripling’s way in the first inning when a series of paper cuts led to three runs.

Four of the first Pirates batters reached base on singles – two infield choppers that shortstop Corey Seager couldn’t turn into outs, a dunker into center field by Starling Marte and a ground ball through the left side of the infield by Andrew McCutchen. That produced two runs.

McCutchen also stole a base when Seager fumbled the throw from catcher Yasmani Grandal. Another run scored when Seager and Chase Utley were too slow to turn Mercer’s ground ball into an inning-ending double play.

“That was a frustrating inning,” Roberts said. “The quality of contact — Ross threw the ball well all night long. To his credit, he didn’t show any emotion or frustration. There’s only so much you can do right there.”

Stripling retired 18 of the 20 batters he faced after the first inning. Solo home runs by McCutchen and Jordy Mercer home runs represented the only potholes on that otherwise smooth road.

He joined Scott Kazmir (July 19) and Kenta Maeda (July 10) as the only Dodgers starters to complete seven innings in the past 43 games.

“On a personal basis … I basically got sent to Arizona for a month because I couldn’t (get deep in games),” said Stripling who spent June at the Dodgers’ training complex in Arizona working on his conditioning but mainly to limit his innings this season.

“So to come back and go seven, show them I could throw 90-plus pitches is a big confidence boost for me.”

Some run support would have been nice too. The Dodgers did outhit the Pirates, 12-7, in the game but did very little damage with those hits.

Howie Kendrick had three of them and drove in the Dodgers’ only run in the second inning when he followed the first of Joc Pederson’s two doubles with a two-out RBI single.

Pirates starter Ivan Nova allowed nine hits in 5 1/3 innings but the Dodgers couldn’t take advantage. They had two hits each in the second, third and fourth innings against Nova but scored only on Kendrick’s RBI single. Adrian Gonzalez led off the sixth with a double but was stranded at third base.

In all, the Dodgers left seven runners on base and went 2 for 7 with runners in scoring position in the first six innings. Ten of the 16 outs Nova recorded came on fly balls including running catches by McCutchen in center field and Starling Marte in left.

“I thought we had some good at-bats against Nova early, hit the ball hard, got some hits, hit some other balls that they made plays on defensively,” Roberts said. “They can track it down out there.

“He didn’t walk guys, made us put the ball in play and those guys over there they can defend.”

There was less activity once Nova left the scene. Four Pirates relievers retired nine of 10 Dodgers batters at one point until Kendrick’s third single of the night in the ninth inning. He went to third on a pinch single from Chris Taylor with two outs.

That put the tying run on deck – as close as it had been since the sixth inning. But Seager popped out.