The experience, E, required to achieve level n from level 0 is:
E = 3.5 * n * (n + 1)
That’s the formulae I found on the wiki. So, If I replace N with 50 my answer for the amount of experience is 8925.
Well, every hostile mob in the game gives 5 experience upon death (also wiki sourced info). That being said, 8925 divided by 5 is 1785.
Something can’t be right, I’ve reached level 50 many times thus far, and there is no way I’ve killed that many mobs per level 50 obtained…
Edit: Ok, Now I’m 110% sure something is horribly wrong. When I checked at the time the comments were all made on this post my in game statistics recorded 2,160 Mob kills.
I just checked again, out of curiosity and it now states I have 5,317 Mob Kills.
Thats over 2,000 kills somehow gained pretty much overnight. Somethings seriously not right, is the statistics page bugged?
Second Edit: Ok apparently the statistics page will never be correct for me, partially because it changes if I play offline (which I do about 70% of the time) and mostly because it doesn’t collect its data for each exclusive world individually. So short of manually counting each monster I kill I dont think this question will ever be answerable unless I completely delete all my statistics folders and create a single game for the sole purpose of figuring this out. If someone has any ideas other than that I’d love to hear them.
Third Edit: The bounty description is a lie, I am playing Vanilla SSP not SMP.
Where did the equation
E = 3.5 * n * (n + 1) come from? I see that you say it came from the wiki, but I am unable to find it on there. I do see:
For any given level, the experience, E, required to achieve the next level n+1 from the current level, n is:
E = 7 + roundDown(n * 3.5)
Thus, if you were level 0 you would require 7 experience to achieve level 1, which is not the case with
E = 3.5 * n * (n + 1). To advance to level 2, you would need 10 more experience, a total of 17, not 14 more experience, with a total of 21. I hope that equation is not correct (because I just spent an hour on what I think is the correct one), and that would explain why you don’t have to kill 1785 hostile mobs before level 50.
I’ve come up with
E = 7n + round(3.5(.5(n^2)-.5n)) - n/4)
E is the total experience needed to reach level n.
“7n” accounts for the constant 7 experience required to reach every next level. This is the only experience you must collect to reach level 1. E = 7 + roundDown(n * 3.5)
The “.5(n^2)-.5n” provides the number of 3.5 increments between level 0 and level n, but ignores the rounding down. Because the rounding down is not yet accounted for, I have “-n/4” (without this, the equation says you require one more experience than reality every 4 levels). E = 7 + roundDown(n * 3.5) Ex. Between levels 0 and 1 the number of required 3.5 experience increments is 0. Between 1 and 2 the number of 3.5 increments is 1. Between levels 2 and 3 the number of increments is 2. Between levels 0 and 3 the number of increments is 3. 0 + 1 + 2 = 3 3*3.5 is 10.5, and then 7*3 is 21. 10.5 + 21 is 31.5
The “round()” rounds up some E values ending in .75 that result from the “-n/4”.
31.5 – 3/4 = 30.75 round(30.75)= 31 And so you need 31 experience to reach level 3 from level 0.
With this equation, you require 4625 experience to reach level 50, which /5 is 925.