How to remain inside a function?

int i = 1;
 while (i==1){     
  for (int i=0; i <= 3; i++){
      Serial.println(i);

Which i are you printing? The global one or the local one?

See why using local and global variables with the same name is not a good idea? See why using one letter global names is not a good idea?

Unless this is a just a dummy program to illustrate a problem, I can't see how it is useful. There is no way to ever get back to the loop() function.