The sequence consists of numbers of the form x^x ("^" means "raised to the power of"). So we have 0^0=1, 1^1=1, 2^2=4, 3^3=27, 4^4=256 (or, equivalently, four times four times four times four). So the next number is 5^5 (five times five times five times five times five) which works out as 3125.