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

Home > Numbers
98 Crossed Sum of Digits Puzzle (Posted on 2023-07-03) Difficulty: 3 of 5
Determine the minimum value of a positive integer N that satisfy the following conditions:
  1. N is a multiple of 101.
  2. N starts with and ends in 98.
  3. sod(N) = 94
*** sod(N) denotes the sum of the digits of N.
For example, sod(3456) = 3+4+5+6 = 18

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 Computer found a smaller one | Comment 5 of 6 |
Since 94/9 = 10.44 etc, the number must contain at least 11 digits.
Starting with 98000000098 which is 68 mod 101, incrementally adding 100 preserves the 98 suffix and decreases the mod 101 value by 1. Therefore 98000006898 is 0 mod 101.
Now incrementally adding 10100 will continue to be a number both divisible by 101 and ending in 98; but not all will have the correct sod.

I wrote a function to determine the smallest number of n digits to start and end with 98 and a middle part of n-4 digits which is zero mod 101.  (ie the smallest middle part)
n   first one
11 98000006898
12 980000000098
13 9800000002798
14 98000000009598
Looping through the number of digits, checking only every 10100th number made the program run pretty fast.

I found 2520 12-digit numbers that fit all the criteria.
The smallest I found was 983939999998 which has an sod of 94 and is divisible by 101

  Posted by Larry on 2023-07-04 08:08:26
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 (3)
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