{"id":"gauss-sum-for-range-problems","text":"The closed-form sum `n*(n+1)//2` is a recurring idiom across this repo for problems involving missing or duplicate numbers in a 1-to-n range, avoiding a second pass to compute the expected sum.","truth_value":"IN","source":"entries/2026/06/06/set-mismatch-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"gauss-sum-for-range-problems","truth_value":"IN","reason":"premise"}]}}