Recursion stops after some executions : <p>I am trying to find the largest prime factor of a number. The code stops working (at least I think like that) after some executions. <code>printf</code> parts are for debugging.
The number is 600851475143.</p>

<pre><code>long recursed(long i, long j){
  if (j == 1){
    return i;
  }
  else if (i%j != 0){
    printf("Else if i : %ld %ld\n", i, j);
    return recursed(i, j-1);
  }
  else{
    i /= j;
    printf("Else i : %ld\n", i);
    return recursed(i, i-1);
  }
}
</code></pre>
