There's a very good answer here: https://stackoverflow.com/a/13467808/6854069
I'm assuming you are trying to calculate time complexity. In that case, if your while loop is
while(i<=n){
i++;
}
then it will take "n" iterations for "i" to reach the value "n". Hence the time complexity is O(n).
Since you are trying to reach "n" at the rate of i^3, the time you will take to reach the value of "n" is i^(1/3). O(n) representation of this is O(n^(1/3)). Your while loop can also be represented as:
while(i<=n){
i++;
i = i*i*i;
}
O(n) representation for time complexity = the number of iterations you take to reach the desired value.