All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
String of 8s and Divisibility (Posted on 2023-07-19) Difficulty: 3 of 5
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.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution | Comment 2 of 3 |

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
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (5)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information