How many integers a with 1 ≤ a ≤ 2 0 1 5 can be written as a sum of numbers of the form 5 0 , 5 1 , 5 2 , … , where each power of 5 may be used at most three times?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
There is a simpler way to understand how to do the counting. See Otto's comment below. It effectively establishes the bijection that we want, which avoids having to do multiple case analysis.
Yes! Nice clear solution! (+1)
The way I did it was more along Vishnu's lines. The short version: 2 0 1 5 1 0 = 3 1 0 3 0 5 and 3 1 0 3 0 4 = 8 4 4 1 0 . (In base 5, we seek the numbers up to 3 1 0 3 0 5 that do not contain the digit 4; those are in one-to-one correspondence with all the 844 numbers up to 3 1 0 3 0 4 in base 4.)
I made a stupid stupid silly mistake and didn't get the answer. Your modified base 5 is nothing but base 4 except the numbers are converted to decimal using powers of 5.
2015=31030 in base 5. I made a mistake and got 2015=31010. Damn It!!!!
But this is how I did it:
Since the question asks for the number of numbers , we just need the value of 2015 in base 5 = 31030 and we can work with numbers in base 4 from now on.
31030 in base 4=844 DEC.
And that's your answer. As simple as that. But I was stupid enough to proceed without checking my results. DAMN IT!
Log in to reply
Great! (+1)
Don't be too harsh on yourself because of that silly computational error... it happens to all of us (I get most of the "simple" Brilliant problems wrong for that reason)
Log in to reply
Hi Otto Love your problems and elegant solutions Perhaps you would solve the following problem for me find the sum of the roots of the equation (1/x^2-1)+(1/x^2-2)+(1/x^2-3)+(1/x^2-4)=2010x-4
Also note that if the number was something like 31044 in base 5 instead of 31030 base 5 =2015 DEC, then you have to go to the greatest number in base 5 that's less than the given number such that the number exists in base 4, i.e, no 4's allowed. So you need to replace the 4s with 3s and then get the value of that number in base 4 converted to DEC.
So in my example, you have 31044. The greatest number satisfying my criteria above is: 31033. which is 2018. 3 years later maybe someone will post a similar question : )
Log in to reply
One more thing that I'd like to add is that it's base 4 because you can use 0,1,2,3 to fill up the places. The counting 0 problem here does not arise because counting starts with 1 (in any base).
So if there was some other condition that said that you can only use prime numbers or something like that, then you can use 2, 3 to represent the digits in base 5. Then you'd have to convert the number to base 2 to get the answer straightaway. This time the criteria is different though. You need to change 2 to 0 and 3 to 1 or something like that and then convert all the 4s to 3s if there are any. Damn it! I'm really fed up with silly mistakes.
@Otto Bretscher , I just solved Part 10 . Basically, it's just tedious work. Like your other question , and with your reference . I just need to find the numbers from 1 to (the period). The rest should be obvious but yet still tedious, got a better approach? For some reason that note Dylan Pentland created reminds me of Graham's number.
Log in to reply
Can you show us your solution, at least a rough outline? Please... I don't have a "silver bullet" solution in this case... I was just checking whether Dylan's observation works for even numbers.
From Dylan's work, we know that the congruency holds for odd a ... let's just look at the even case.
Log in to reply
All the tedious work... Modular arithmetic > Euler Theorem / Fermat Little Theorem mix with CRT.
Check for < 20. Then check for < 15 because in between 2000 to 2015.
And we can easily know that 6 and 16 are the answers for the range < 20 because (...6)^(some integer) = (.... 6)
That's why I asked whether there is a better approach.
Problem Loading...
Note Loading...
Set Loading...
I define a number of the form "modified base 5 with maximum number 3". And I'm going to use colours to assign that number. For example, A 1 A 2 A 3 A 4 A 5 = A 1 × 5 4 + A 2 × 5 3 + A 3 × 5 2 + A 4 × 5 1 + A 5 × 5 0 with integers, 0 ≤ A 1 , A 2 , A 3 , A 4 , A 5 ≤ 3 .
Suppose A 1 < 3 , then the maximum value of the number is 2 3 3 3 3 = 2 ⋅ 5 4 + 3 ( 5 3 + 5 2 + 5 1 + 5 0 ) < 2 0 1 5 . So we can have 3 × 4 4 = 7 6 8 possible values of values of a . But since a > 0 , then 0 0 0 0 0 is not possible, so there's only 7 6 7 possible values of a .
Now suppose A 1 = 3 , A 2 = 0 , then the maximum value of the number is 3 0 3 3 3 < 2 0 1 5 . So we can have another 4 4 = 6 4 possible numbers of a .
Again, suppose A 1 = 3 , A 2 = 1 , then A 3 = 0 else the number will exceed 2 0 1 5 because it's minimum value is 3 1 1 0 0 = 2 0 2 5 > 2 0 1 5 .
So we just need to check for integer values of 0 ≤ x , y ≤ 3 such that 3 1 0 x y ≤ 2 0 1 5 .
It can be easily verified that if x = 0 , 1 or 2 , they each produce 4 values of y . Thus another 4 × 3 = 1 2 solutions.
Lastly, at x = 3 , y is forced to be 0 because it already attains a maximum value. 3 1 0 3 0 = 2 0 1 5 .
Hence, a total of 7 6 7 + 6 4 + 1 2 + 1 = 8 4 4 solutions.