Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $n=a_m10^m++a_{m-1}10^{m-1}+\dots + a_{2}10^2+a_{1}10+a_0$ where $a_k$ are integers and $0\leq a_k \leq 9,k=0,1,\dots,m$ be the decimal representation of a positive integer $n$.
Let $S=a_0+a_1+\dots + a_m, T=a_0-a_1+ \dots + (-1)^m a_m$. Then
1.$n$ is divisible by $2$ iff a_0 is divisible by $2$.
2. $n$ is divisible by 11 iff $T$ is divisible by 11.
3. $n$ is divisible by 3 iff $S$ is divisible by 3. I know the proof of these results. I shall prove first one and the proof of rest two are similar.
Now my question : Is there any similar rule which will tell us whether an integer
$n$ is divisible by the primes 17,19,23,37,41 etc or not?

share|cite|improve this question
Hope the following proof help to solve my question – Md Kutubuddin Sardar Mar 30 '13 at 12:04
@labbhattachajee thanks for giving this link. But there is no solution for the test of 23,37,41 and higher primes. – Md Kutubuddin Sardar Mar 30 '13 at 12:12
please let me know if you could not follow $(3)$ of the answer : " any number $y$ co-prime with $10$" – lab bhattacharjee Mar 30 '13 at 15:49

Proof of first one.
Let us consider the polynomial
$f(x)=a_m x^m++a_{m-1}x^{m-1}+\dots + a_{2}x^2+a_{1}x+a_0$.
We have $10 \equiv 0(mod~ 2)$.
Therefore $f(10) \cong f(0)(mod ~ 2)$.
But $f(10)=n$ and $f(0)=a_0$.
Therefore $2 | (n-a_))$.
Hence $2 |n$ iff $2 | a_0$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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