You are on page 1of 5

Accelerat ing t he world's research.

A Divisibility Test for Any Prime


Melfried Olson

School Science and Mathematics

Cite this paper Downloaded from Academia.edu 

Get the citation in MLA, APA, or Chicago styles

Related papers Download a PDF Pack of t he best relat ed papers 

Lect ure Not es on Mat hemat ical Olympiad Courses For Junior Sect ion Vol. 2
T igau Dorel

Divisibilit y: A Problem Solving Approach T hrough Generalizing and Specializing


Rina Zazkis

A concret e int roduct ion t o higher algebra


Abrar Moe
578

A Divisibility Test for Any Prime


Melfried Olson
Gerald K. Goff
The concept of divisibility is dealt with
at almost every level of mathematics
education. The rules of divisibility for 2
and 5 are well known, the special rules
for 3, 4, 7, 9 and 11 are also frequently
developed (Engle, 1976; Long, 1971;
Yazbak, 1976) and attempts to provide
a more general criteria for divisibility
are also available (Boley, 1968;
Hutchins, 1983; Kennedy, 1971; Mor-
ton, 1968; Smith, 1978). Even the most
explicit explanation, however, lacks a
generalized procedure for quickly
checking divisibility.
In the search for a more efficient method the following simple global proce-
dure, w4th appropriate algorithmic techniques, was developed. The method is
easily developed through algebraic manipulations understood by students.
With the rules for 2, 3, and 5 known, we begin by considering any prime/?,
p > 5. Clearly any prime/? > 5 is odd, sop= 10/:+r, where/= 1, 3, 7 or 9. Now,
for each prime p > 5, we can find a positive integer x such that px= 10c+ 1 as
follows:
A prime number
of the form integer A" /?A’==10c+l c
(1) lOA’+l 1 (10A-+1)1=10^+1 c=k
(2) 10A-+3 7 (Wk +3)7 =10(7^+2)4-1 c=7A-+2
(3) 10/:+7 3 (10/:+7)3=10(3^+2)+1 c==3^+2
(4) 10^4-9 9 (10A:+9)9=10(9A’+8)4-1 c=9Ar+8
Given p and having found x and c above, we now consider whether/? will di-
vide an arbitrary integer TV. Any even integer can be factored as a power of 2
times an odd integer, so we need only consider any odd integer N:
7V= \0b +c/,W4th (/{!, 3,7,9}
or
N=Wb-Wcd+Wcd+d, where px= 10c+ 1,
or
N-=W(b-cd)-}-(Wc+l)d.

School Science and Mathematics


Volume 86 (7) November 1986
A Divisibility Test 579
Since/?|(10c+l) then p\N if and only if p\\0(b-ccf). Since /?}10, p\\0(b-cd) if
and only if/? |(Z? - cd).
Thus we have developed a procedure for testing divisibility for any prime.
Upon examining this argument, we also note that:
1. The test applies to any number ending in 1, 3, 7, or 9, since the condition that
p is prime was not used in above formulation,
and
2. s’mceb-cd=p(d)-}-b+p(d)cdf b - cd=(b { (p c)d) mod/?, this relation-
ship yields two different tests for divisibility for each/?:
(i) P\Niffp\(b-ccf),OT
(ii) P\Niffp\(b+(p-c)d),
and
3. for p= 10A:+ 1, the choice of.y=I gives us c=k; for/?= lOAr+3, the choice of
x=7 gives usc=7^+2; for p = \0k 4- 7 the choice of x =3 gives us c=3Ar+2; and
for/?=10Ar+9 the choice of x =9 gives us c=9A:+8, so that the calculation ofc
and (b - cd) (or b + (p c)d) for each value of/? is easily performed.
To see how this test works, consider /?= 13. Here/?=10-/:+3, with k= 1, so
we choose A-=7 and get px= 13-7=91 = 10-9+ 1 or, consider (2) above and
select .v=7 so that c’=7-/:+2=7-l +2=9. In either case/?-c= 13-9=4. Thus
the test for divisibility for 13 is 13 \Niff 13\(b-9d) by (i). or 13|(Z?+4cf) by (ii).
Applying version (ii) of this test to check whether or not 13 is a factor of 14736
we observe the following:

b d b_ P^c d_
14736= 10(1473)+6 and 13|14736 iff 13|(1473+4-6)= 1497
1497=10( 149)+7andl3| 1497 iff 13|( 149+4-7)= 177
177=10( 17)+7andl3| 177 iff 13|( 17+4-7)= 55
55=10( 5)+5andl3| 55 /// 13|( 5+4-5)= 25

Since 13)25 (or 55) then 13|14736.


From the above example, we see that the notation N= \0b + d does not limit N
to be a 2-digit number. If N has more digits than 2, we simply apply the rule re-
cursively until the check for divisibility can be accomplished by inspection.
Consider another example, where /?=37 and N=64259. Here /?=10*3+7.
Therefore by (3) we choose A: =3 and obtain px= 37 -3= 111 =10-11 +1 which
implies c=ll, (or, from (3), as x=3 then c=3-k+2=3-3+2= 11), and
/?-c=37-H=26.Thus 13]64259 iff \3\(b- \\d) or 13|(^+26c0. Applying the
first version of this test we see

37J64259 //y37|(6425 - 11 -9) or 37|6326


07371(632-11-6) or 37|566
(//’37K56-11-6)or 37|-10
Since 13 \- 10. then 37J64259.

School Science and Mathematics


Volume 86 (7) November 1986
580 A Divisibility Test
In any case, a decision whether to use b - cd or b + (p - c)^/ to check for divisi-
bility needs to be made. While the use of b-cd will always make the new N
smaller than the use of b-}-(p-c)d, you may prefer to use bJr(p-c)d if
{p-c)<c.
The usefulness of these tests, of course, decreases as p becomes larger, but for
2-digit values ofp, or for an N with too many digits for entrance on a calculator,
this provides a quick and consistent method for checking divisibility. For large
values ofN, this will quickly reduce to a number that has few enough digits to be
entered on a calculator. For example, Iet*s use it to check if N= 3124580216457 is
divisible by 41. Herep= 10’A’+ 1, with K=4, so choosing ^=1, by (1) we find
c = 4 and p - c = 37. Using b - Ac we find

41|3124580216457 iff 411312458021645- 28 =312458021617


iff 41|31245802161-28=31245802133
iff 41 [3124580213-12 =3124580201

Since 3124580201 can be entered on a calculator with a ten-digit display, we may


use a calculator at this point to see if41|3124580201. Since it does not, we con-
clude 41 ft 124580216457. If the calculator with w^ich you work has a smaller
display, you need to apply this rule until you have a number which can be entered
on your calculator.
To use this procedure efficiently one may want to record the process differ-
ently. For example, to see if ^=10404534517493 is divisible by 41 we would
write the following (using b - 4c):
10404534517493
-12 (12=4-3)

1040453451737
-28 (28=4-7)
104045345145
-20 (20=4-5)

10404534494
-16 (16=4-4)

1040453433
Using the calculator, we find 41(25376913) = 1040453433 and so we know that 41
does divide 10404534517493. However, suppose we wish to find the other factor.
Since
10404534517493-41(253769130000) =10404534517493-10404534330000
=187493
=41(4573),

School Science and Mathematics


Volume 86 (7) November 1986
A Divisibility Test 5 81
then
10404534517493=41(253769130000+4573)
=41(253769134573).
We have therefore determined the other factor.
This process provides a completely generalized alternative to the rules for di-
visibility reviewed at the beginning of the paper and demonstrates that two num-
bers with the same units digit have some similar relationships regarding rules for
divisibility. These relationships, together with the familiar tests for divisibility by
2 (and powers of 2), 3, and 5, give us an easy method for checking divisibility by
any number.
References
Boley, Daniel L. A Simple General Criterion of Divisibility, The Mathematics Teacher 61
(Mayl968): 501-02.
Engle, Jessie Ann. A Rediscovered Test for Divisibility by Eleven, The Mathematics
Teacher 69 (December 1976): 669.
Hutchins, Harry. License Numbers and Divisibility Rules, The Two-Year College Mathe-
matics Journal 14 (March 1983): 122-25.
Kennedy, Robert E. Divisibility by Integers Ending in 1, 3, 7, 9, The Mathematics Teacher
65 (February 1971): 137-38.
Long, Calvin T. A Simpler *7’ Divisibility Rule, The Mathematics Teacher 64 (May
1971): 473-75.
Singer, Richard. Modular Arithmetic and Divisibility Criteria, The Mathematics Teacher
63 (December 1973): 653-56.
Smith, Lehi T. A General Test of Divisibility, The Mathematics Teacher 71 (November
1978): 668-69.
Yazbak, Najib. Some Unusual Tests of Divisibility, The Mathematics Teacher 69 (Decem-
ber 1976): 667-68.

Melfried Olson Gerald K. Goff


University of Western Illinois Oklahoma State University
MaComb, Illinois 61455 Stillwater, Oklahoma 74078

MOTOR COMPANIES GO METRIC


U.S. automobile manufacturers are fast becoming predominantly metric in
the design and production of their cars. GM cars are almost 100% metric; Ford
cars are about 50% metric; Chrysler cars are about 70% metric; and American
Motors cars are about 20% metric. Design interchangeability and simplicity and
the reduction in the number of sizes of various parts are the most-cited reasons
for this industry’s move to metric.

School Science and Mathematics


Volume 86 (7) November 1986

You might also like