A gym offers regular memberships for $80 per month and off-peak memberships for $60 per month. Last month, the gym sold a total of 420 memberships for a total of $31,100. The following system of equations models this scenario:

80x + 60y = 31,100
x + y = 420

How many of the memberships sold were regular memberships?

We can solve for x, the number of regular memberships, by rearranging the second equation to get y = 420 - x, and substituting it into the first equation:

80x + 60(420 - x) = 31,100
80x + 25,200 - 60x = 31,100
20x = 9,900
x = 495

Therefore, the gym sold 495 regular memberships.