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

Home > Numbers
8s and 9s (Posted on 2011-12-21) Difficulty: 3 of 5
Find a 13 digit positive integer N whose base ten representation consists entirely of 8s and 9s such that 213 divides N.

No Solution Yet Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

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

DECLARE SUB vary (psn#)
DEFDBL A-Z
DIM SHARED bse
bse = 8888888888888#
vary 0

SUB vary (psn)
 addend = INT(10 ^ psn + .5)
 modval = bse
 q = INT(bse / 8192)
 r = bse - q * 8192
 IF r = 0 THEN PRINT bse
 IF psn < 12 THEN vary psn + 1
 bse = bse + addend
 modval = bse
 q = INT(bse / 8192)
 r = bse - q * 8192
 IF r = 0 THEN PRINT bse
 IF psn < 12 THEN vary psn + 1
 bse = bse - addend
END SUB

gives

8898989989888


  Posted by Charlie on 2011-12-21 12:41:17
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


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

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