Note that
so that
i.e. the remainder upon dividing 2013 (in base 10) by 3 is 3. The point is that any base-
representation of
will end in the digit 3 whenever division of 2013 by
leaves a remainder of 3.
First, we require that
, because any smaller base simply won't have 3 as a possible digit.
Second, we clearly can't have
, because any value of
beyond that point will have 2013 as its first digit. That is, in base 2014, for instance, if we separate the digits of numbers by colons, we would simply have
(the 0s aren't necessary here, but only used for emphasizing that 2013 would be its own digit, regardless of how we represent digits outside of 0-9).
Third, we can't have
because 2013 divides itself and has no remainder. That is,
.
So we've reduced the possible domain of solutions from all positive integers to just those lying within
.
Now, in terms of modular arithmetic, we're essentially solving the following equivalence for
:
which, if you're not familiar with the notation or notion of modular arithmetic, means exactly "2013 gives a remainder of 3 when divided by
". It's equivalent to saying "there exists an integer
such that
.
From this equation, we have
. Now, we know both
must be integers, so we need only find the factors of 2010. These are
1, 2, 3, 5, 6, 10, 15, 30, 67, 134, 201, 335, 402, 670, 1005, 2010
So we have 16 total possible choices for
. But we're omitting 1, 2, and 3 from the solution set, which means there are 13 base-
representations of the base-10 number
such that the last digit
is 3. They are
- - -
Added a link to some code that verifies this solution. In case you're not familiar with Mathematica or the Wolfram Language, in pseudocode we are doing:
1. Start with a placeholder list called "numbers", consisting of all 0s, of length 2010. We know
, which contains 2010 possible integers.
2. Iterate over
:
2a. Start with
.
2b. Ensure
doesn't exceed 2013.
2c. After each iteration, increment
by 1; in other words, after each step, increase
by 1 and use this as a new value of
.
2d. Check if the last digit of the base-
representation of 2013 ends is a 3. In the WL, IntegerDigits[x, n] gives a list of the digits of x in base-n. We only want the last digit, so we take Last of that. Then we check the criterion that this value is exactly 3 (===).
2d1. If the last digit is 3, set the
-th element of "numbers" to be a list consisting of the base
and the list of digits of 2013 in that base.
2d2. Otherwise, do nothing, so that the
-th element of "numbers" remains a 0.
3. When we're done with that, remove all cases of 0 from "numbers" (DeleteCases). Call this cleaned list, "results".
4. Display "results" in Grid form.
5. Check the length of "results".