When the positive integer N is divided by 17, the remainder is four times as much as when N is divided by 13.
Find the least possible value that N could represent.
The least possible value of N is 29.
clearvars,clc
for n=1:500
r1=mod(n,17);
r2=mod(n,13);
if r1==4*r2
disp([n r1 r2])
end
end
finds
N r17 r12
29 12 3
93 8 2
157 4 1
186 16 4
221 0 0
250 12 3
314 8 2
378 4 1
407 16 4
442 0 0
471 12 3
|
Posted by Charlie
on 2024-02-15 10:39:10 |