Ad
  • Custom User Avatar

    Please check why 183,187,189 in your list and you will find the answer.

  • Default User Avatar

    447 is the correct value.

  • Default User Avatar

    Hey @devheptagon - I don't use C# so I can't see your solution, but I can confirm the tests are correct - 447 is indeed the u(100) value.

    I compared your list of 100 values to mine and the first 99 values do in fact seem correct, so I don't know why exactly this error is appearing for u(100).

    However, you can tell that your own solution is wrong somehow just by looking at its results: your own solution above contains the value 223 (after 202 and before 231) - so if your algorithm includes 223 it should also include 2 * 223 + 1 = 447. Yet 447 doesn't appear in your result.

    So I would start by looking there for hints on what to debug. You are also missing the value 463 = 2 * 231 + 1 before 471 if that helps you debug as well (note that 231 appears in your current list but 463 does not).

    edit - you are also missing lots of numbers between 607 and 706 - there are 12 missing values there that your solution is not producing at the moment, so indeed it seems like your approach is incorrect somehow for larger values.