Problem
NT-B2-M01-P012 The Seventeenth Remainder
#12
★★★★☆ Level 4 of 5
Find all positive integers \(n\) such that \( \gcd(n^2+2,n^3+3)>1 \).
From a common divisor obtain \(2n-3\), then eliminate \(n\).
Let \(d\) be a common divisor. Then \(d\mid n(n^2+2)-(n^3+3)=2n-3\). Hence \(2n\equiv3\pmod d\). Multiplying \(n^2+2\) by \(4\), we get \(4n^2+8\equiv9+8=17\pmod d\). Thus \(d\mid17\). A nontrivial common divisor can occur only when \(17\mid d\), that is, when \(2n\equiv3\pmod{17}\). Since \(2^{-1}\equiv9\pmod{17}\), we get \(n\equiv27\equiv10\pmod{17}\). Direct checking shows that for such \(n\), both expressions are divisible by \(17\).
This is a real olympiad-style problem: two transformations and an invertibility check.