Well it doesn't have to be that exact combo, but that combo works. The equation for HP type is (t1 + t2 + t3 + t4 + t5 + t6) *15 /63. The outcome can be between 0 and 15. Each type is assigned to one of these numbers to determine which it is. To finish the equation we have to determine the values t1 to t6:
t1 = 1, when HP IV is odd
t2 = 2, when A IV is odd.
t3 = 4, when D IV is odd.
t4 = 8, when Speed IV is odd.
t5 = 16, when Sp.A IV is odd.
t6 = 32, when Sp.D IV is odd.
Then to get the base power the equation is (t1 + t2 + t3 + t4 + t5 + t6) *40 /63 + 30. This can result is 30 to 70, and the answer is the BP. To determine t1 to t6 in this case:
t1 = 1, when HP IV/4 has a remainder of 2 or 3.
t2 = 2, when A IV/4 has a remainder of 2 or 3.
t3 = 4, when D IV/4 has a remainder of 2 or 3.
t4 = 8, when Speed IV/4 has a remainder of 2 or 3.
t5 = 16, when Sp.A IV/4 has a remainder of 2 or 3.
t6 = 32, when Sp.D IV/4 has a remainder of 2 or 3.
So the combo I gave you works because the values fit, but the attack IV could be 31 instead of 27 also, as it will still be odd and when divided by 4 will still have a remainder of 2 or 3.