The problem exists in the part where the level is divided by 2.

All even numbers, when divided by two produce a whole number, whereas odd numbers produce non-integer values. As sumwun said, the way Pokemon executes math is that non-integer values are constantly rounded **down** to produce a whole number.

Assume `n`

is **even**. Knowing this, dividing `n`

by two will always result in a **whole number** `n/2`

. Thus, when `n`

is increased by one, it will become odd. Divide by two:

`(n+1)/2`

`= n/2 + 0.5`

0.5 is not whole, so round down

`= n/2 + 0`

`= n/2`

Therefore `n/2 = (n+1)/2`

Thus, when `n`

is **odd**, the formula actually becomes n^3*(((**(n-1)**/2) + 32)/50). You can justify by letting `n = 39`

:

39^3*((((39-1)/2) + 32)/50)

= 60505.38

= 60505

Which is the value presented on Bulbapedia!

Thank you sumwun for pointing that out since I would have never realised.

Hope I helped. :)

Source