All the numbers from $19$ to $93$ are written consecutively to form the number $N =19202122...........919293$. Find the largest power of $3$ that divides $N$.

The following hint has been provided.

The square of any integer is either divisible by $4$ or leaves a remainder $1$ divided by $4$. Thus, an integer which leaves a remainder $2$ or $3$ when divided by $4$ can never be a square. If a prime p divides a square number the $p^2$ also divides that number.


closed as off-topic by Namaste, Jyrki Lahtonen, Xander Henderson, José Carlos Santos, Adrian Keister Jul 29 '18 at 0:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Namaste, Jyrki Lahtonen, Xander Henderson, José Carlos Santos, Adrian Keister
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ What is your attempt? $\endgroup$ – Mythomorphic Jul 28 '18 at 12:43
  • 1
    $\begingroup$ 1 st power of 3 only $\endgroup$ – maths student Jul 28 '18 at 13:00

With a bit more rigour and without a calculator, we have:

$$N =\sum_{k=0}^{93-19 } (93-k)\cdot 10^{2k}$$

Now if we inspect this $\bmod 9$ we can use the fact that $10^j \equiv 1 \mod 9$ to find:

$$N \equiv\sum_{k=0}^{74} (93-k) \mod 9$$ $$N \equiv 75\cdot 93 - \sum_{k=0}^{74} k \mod 9$$ $$N \equiv 3\cdot 3 - \frac{1}{2}\cdot 74\cdot 75 \mod 9$$ $$N \equiv 9 - 37\cdot 3 \mod 9$$ $$N \equiv 9 - 1\cdot 3 \mod 9$$ $$N \equiv 6 \mod 9$$

Thus we know that $N$ is not divisible by $9$. But since $(N \bmod 9) \equiv N \mod 3$ we can re-use the above calculation to immediately find that $N \equiv 0 \mod 3$ and thus is divisible by $3$. That is the largest power of $3$ that divides $N$.


First of all calculate sum of digits that sum of natural numbers from 19 to 93 which is 4200. It is divisible by 3 but not 9. For divisibility of higher power it has to be divisible by 9 but it is not divisible by 9. So higher power should be 1.

  • $\begingroup$ Brilliant! Wonder how it could be done if the sum were divisible by $9$ $\endgroup$ – rsadhvika Jul 28 '18 at 13:26
  • $\begingroup$ @rsadhvika hint might help. $\endgroup$ – maths student Jul 28 '18 at 13:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.