N corresponds to a string of 8s given by 888888....8888, where N is divisible by 299.
Find the last four digits of the quotient when N is divided by 299.
Apparently N is the number that the string of 8's represents, not the number of 8's in the string.
clearvars,clc
N=sym(888) ;
while N<9e200
if mod(N,299)==0
disp(N)
cN=char(N);
disp(length(cN))
disp(N/299)
cq=char(N/299);
disp(cq(end-3:end))
end
N=N*10+8;
end
finds
N = 888888888888888888888888888888888888888888888888888888888888888888
number of 8's = 66
quotient 2972872538089929394277220364176885916016350798959494611668524712
last 4 digits 4712
and subsequent N's (same format):
888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888
132
297287253808992939427722036417688591601635079895949461166852471200
2972872538089929394277220364176885916016350798959494611668524712
4712
888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888
198
297287253808992939427722036417688591601635079895949461166852471200
297287253808992939427722036417688591601635079895949461166852471200
2972872538089929394277220364176885916016350798959494611668524712
4712
|
Posted by Charlie
on 2023-07-19 13:14:02 |