Ad
  • Custom User Avatar

    Needs random tests(?)

  • Custom User Avatar

    The result is saturated once n reaches 13 anyway, so there's no point in giving an input range as big as n<=1000.

  • Custom User Avatar

    You did not provide any actual formula how to calculate the next iteration.

    The equation provided is inadequate, and it leaves to people to guess what the actual formula is.