FA-5501 / Number theory / Open access
Divisor count square root pair · case 01
A square-root divisor is counted twice.
ROOT CAUSE
A square-root divisor is counted twice.
VERIFIED REPAIR
Apply the specified mathematical contract directly, preserving all terms and boundary cases: return sum(n%d==0 for d in range(1,n+1))
Unsuccessful approach: Excluding the root loses its one contribution and misses nonsquare boundary factors.
Case contract
Integer inputs; n is positive unless a zero or negative fixture explicitly extends that operation. A modulus is greater than one; p is prime; exponent k may be signed when an inverse exists. Divisor count square root pair. Exact operational definition: sum(n%d==0 for d in range(1,n+1))
Why this case matters
Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Number theory results depend on the stated convention.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(n):
return 2*sum(n%d==0 for d in range(1,math.isqrt(n)+1))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1,)', solve(*(1,)), 1)
check('fixture 2: (9,)', solve(*(9,)), 3)
check('fixture 3: (12,)', solve(*(12,)), 6)
check('fixture 4: (25,)', solve(*(25,)), 3)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: (1,) | 2 | 1 | Failed |
| fixture 2: (9,) | 4 | 3 | Failed |
| fixture 3: (12,) | 6 | 6 | Passed |
| fixture 4: (25,) | 4 | 3 | Failed |
SHA-256 / d114d44315675f8cb7db06eddadd55042f3cc183f67bf1c99bc2949f60af3618
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(n):
return 2*sum(n%d==0 for d in range(1,math.isqrt(n)))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1,)', solve(*(1,)), 1)
check('fixture 2: (9,)', solve(*(9,)), 3)
check('fixture 3: (12,)', solve(*(12,)), 6)
check('fixture 4: (25,)', solve(*(25,)), 3)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: (1,) | 0 | 1 | Failed |
| fixture 2: (9,) | 2 | 3 | Failed |
| fixture 3: (12,) | 4 | 6 | Failed |
| fixture 4: (25,) | 2 | 3 | Failed |
SHA-256 / 7414f71cbbf31846c3b643468a8bb3135efb83854262098f21c32f6c180a33d5
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(n):
return sum(n%d==0 for d in range(1,n+1))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1,)', solve(*(1,)), 1)
check('fixture 2: (9,)', solve(*(9,)), 3)
check('fixture 3: (12,)', solve(*(12,)), 6)
check('fixture 4: (25,)', solve(*(25,)), 3)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: (1,) | 1 | 1 | Passed |
| fixture 2: (9,) | 3 | 3 | Passed |
| fixture 3: (12,) | 6 | 6 | Passed |
| fixture 4: (25,) | 3 | 3 | Passed |
SHA-256 / ef907bae86df1d36da778381e46f66700580b2bde64899c79bc74b4e9f07565a
Verification & scope
This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:37:50.176990+00:00.
Case digest / 6e5236d489cc0b7bc1bc16ec0253f234ba987c8f8f5e5b9a3946cc190c06e6b2