Hacker News new | ask | show | jobs
by vworldv 2386 days ago
Due to a parity issue (50 here is even) we need to adjust username90's solution. In particular, a sequence of consecutive integers of even length has a half-integer in its middle.

In this case, let's consider the sequence of 50 consecutive integers 16, 17, ..., 40, 41, ..., 65 where 40.5 is in the middle and the sum is 40.5 * 50 = 2025. Subtracting 2009 we get a supposed erased value of 2025 - 2009 = 16 and this indeed correspond to a valid solution:

16, 17, ..., 65 => 17, ..., 65

We also could've considered the sequence 17, ..., 41, 42, ..., 65, 66 centered at 41.5 and this would've led to an erased value of 41.5 * 50 - 2009 = 66 which is another solution:

17, ..., 65, 66 => 17, ..., 65

1 comments

Right, but we are talking about sixth-graders here. If a sixth-grader saw username90's solution and tried to apply it to the adjusted problem, they would not know that the result is incorrect without actually summing up all the numbers to check, an undesirable chore on a math contest with other problems to worry about.