Check your formula - it is incorrect. It works for the Pythagorean triplet 3,4,5:

3^3 + 4^3 + 3(3)(4) = 127;\ \ 5^3 = 125

but not for the triplet 5,12,13:

5^3 + 12^3 + 3(5)(12) = 2033; \...