Question Number 168458 by aaaspots last updated on 11/Apr/22
$${How}\:{to}\:{check}\:{f}\:{g}\:{is}\:{the}\:{smallest} \\ $$$${h}\:{I}\:{have}\:{no}\:{idea} \\ $$Find the smallest positive integer n for which the function f(n) = n^2 + n + 17 is composite. Do the same for the functions g(n) = n^2 + 21n + 1 and h(n) = 3n^2 + 3n + 23
Commented by Rasheed.Sindhi last updated on 11/Apr/22
$${f}\left({n}\right)={n}^{\mathrm{2}} +{n}+\mathrm{17} \\ $$$${f}\left(\mathrm{17}\right)\:{is}\:{certainly}\:\boldsymbol{{composite}}: \\ $$$$\:\:{f}\left(\mathrm{17}\right)=\mathrm{17}^{\mathrm{2}} +\mathrm{17}+\mathrm{17}=\mathrm{17}\left(\mathrm{17}+\mathrm{1}+\mathrm{1}\right) \\ $$$${So}\:{the}\:{required}\:{n}\leqslant\mathrm{17} \\ $$$$\mathcal{T}{est}\:{for}\:{f}\left(\mathrm{1}\right),{f}\left(\mathrm{2}\right),…,{f}\left(\mathrm{16}\right).\mathcal{T}{hey}'{re} \\ $$$${all}\:{primes}. \\ $$$$\therefore\:\mathcal{T}{he}\:{smallest}\:{n}\:{for}\:{which}\:{f}\left({n}\right)\:{is} \\ $$$${composite}\:{is}\:\mathrm{17}. \\ $$$$\mathcal{D}{on}'{t}\:{know}\:{simpler}\:{method}. \\ $$