The problem is this:
Let $G$ be a connected, planar graph whose number of vertices is a multiple of $8$. $5/8$ of the vertices have degree $3$, $1/4$ have degree $4$, and $1/8$ have degree $5$. All faces of $G$ are triangles or quadrilaterals. Find the number of triangular faces, the number of quadrilateral sides, the number of vertices and the number of edges of $G$. Draw at least one such graph.
It is a problem from an old exam. (I'm trying to prepare for mine.)
I've seen people solve problems like this using a formula that had some kind of a weighted sum in it (and I think the weights were degrees, probably of vertices), and it looked like it was linked to Euler's formula. I remember people saying that they were no-brainers, with an algorithmic procedure for solving them. Unfortunately I didn't understand the formula then, and I can't find it now, either in my notes or on the internet.
Could you please help me with this? I've been trying to derive something useful from what I know about Euler's theorem, but I'm failing badly.