coolkl
Infer - we need 2*3*5 in the dividend.
S-1) k * m (m-1) (m+1) if m is 10 sufficient
but if m = 11 not sufficient. Also no information on k. K can be same as m. Not sufficient.
S-2) x = n (n-1) (n+1) (n^2+1). Consider n as odd and even value.
n = 12 then 11,12,13,145 sufficient
n = 11 then 9,10,11,122 sufficient as we have 2*3*5
Great solution for S-2. I'll just generalize it a bit further.
For n=10, 11, 14 or 15 we already have a
5 factor in (n-1)n(n+1). In fact, this applies to any n with units digit of 0, 1, 4, 5 as well as 6 (because 1+
5) and 9 (because 4+
5).
There is only need for testing for n when n has 2 or 3 as a units digits* (12, 13, 22, 23, ...) because they don't have a 5 factor in (n-1)n(n+1).
The goal here is to find out if there is a factor 5 in (n²+1).
The answer is YES, because if
units digit of n=2, units digit of (n²+1)=5
units digit of n=3, units digit of (n²+1)=0
Therefore S-2 is sufficient.
*No need for testing unit digit 7 and 8 because they are just a factor 5 away from 2 and 3.