How would I represent this for loop in a mathematical equation?
double n = 1;
double x = Math.pow(3, n);
for(double i = 0; i < n; i++){
x = x + Math.pow(3, i);
}
Sorry wrote it in Java in a hurry.
See Question&Answers more detail:os