Matt Cain’s gem helps Giants shave magic number to 5

Pablo Sandoval smacked a three-run homer among his three hits and Matt Cain won his career-high 15th game as the Giants lowered their magic number to win the National League West to five with a 7-1 victory over Colorado on Wednesday at AT&T Park.

Gregor Blanco also had three hits and drove in a pair, while Buster Posey and Brandon Belt each had an RBI for the Giants, who increased their lead over the Los Angeles Dodgers to nine games. Los Angeles split a doubleheader at Washington.

Cain (15-5) stretched his winning streak to five over his last eight starts. He allowed one run on four hits and struck out eight as the Giants won their fifth straight over the Rockies and improved to 13-4 against them this season. Cain is 5-0 with a 1.59 ERA in his last six home starts against Colorado.

Colorado’s Tyler Chatwood (4-5) fell to 0-2 with an 8.08 ERA in four September starts. He allowed three runs — Sandoval’s homer off the right-field foul pole in the first inning — and eight hits in four frames.

After D.J. LeMahieu’s sacrifice fly made it 3-1 in the fifth inning, the Giants scored three in the bottom half, capped by Blanco’s two-run single. Posey added an RBI single in the sixth.

NOTES: Rockies left fielder Carlos Gonzalez (left hamstring) returned to the lineup and went 0-for-4. He missed Tuesday’s game and was limited to a pinch-hitting role Monday. … Giants infielder Marco Scutaro, who was acquired from Colorado on July 27, is 13-for-27 (.481) against his former team this season and is hitting .353 with 32 RBIs in 50 games since joining San Francisco.

How Deebo Samuel’s wizardry helped Niners turn season around

Team hoping its most versatile offensive weapon can overcome injury soon

By Al Saracevic
How the Warriors use data, analytics to engineer more wins

‘It is a new Moneyball’

By Jeff Elder
Warriors’ Jordan Poole filling Klay Thompson’s big shoes

Shooting guard helping Golden State maintain its hot start

By John Krolik