Which four consecutive odds, when multiplied together, give the product 6xxxxxx9?
Each x represents a digit, not necessarily the same.
p=1*3*5*7;
% while p<99999999
for n=9:2:555
p=p*n/(n-8);
ps=num2str(p);
if length(ps)==8
if ps(1)=='6' && ps(8)=='9'
disp([n-6:2:n p])
end
elseif length(ps)>8
break
end
end
finds
87 89 91 93 65529009
|
Posted by Charlie
on 2024-06-21 10:21:45 |