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

Home > Numbers
Remainder Crossed Digit Permutation Resolution (Posted on 2023-07-06) Difficulty: 3 of 5
Consider x = 3168 and y = 7A2B4C54995D458E1F9G6H3I17862, where ABCDEFGHI represents some permutation of the digits 1, 2, 3, 4, 5, 6, 7, 8, 9.

Determine the total number of such permutations such that the remainder of y upon division by x is exactly 2022.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer-aided analysis | Comment 2 of 3 |
Cute!

The script was built up to the next to last line shown:

ys='70204054995045801090603017862'
y=sym(ys);
x=3168;
baseMod=mod(y,x)
ix=strfind(ys,'0')
positions=length(ys)-ix
vals=powermod(sym(10),positions,x)
shouldBe2022=baseMod+mod((sum([1:9].*vals)),x)

when I added the shouldBe2022=  line at the end, after seeing the results of the preceding lines.

ys =
    '70204054995045801090603017862'
    
baseMod =
582

ix =
     2     4     6    12    16    18    20    22    24
     
positions =
    27    25    23    17    13    11     9     7     5
    
vals =
[1792, 1792, 1792, 1792, 1792, 1792, 1792, 1792, 1792]

shouldBe2022 =
2022

meaning that

If the lettered positions were all zero, the modular value of the long number would be 582.

The positions (leftmost is 1) of the letters are given in the value of the ix vector (array).

The decimal power (power of 10) value of the positions is shown in the positions vector.

The modular value of 10 raised to that power value is given by vals. And, surprise, they are all the same: 1792.

Adding 582 to the sum of the digits 1 through 9 times 1792 does indeed give 2022 mod x.

Therefore each of the 9! = 362880 permutations gives the desired number.


  Posted by Charlie on 2023-07-06 07:11:45
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 (0)
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