You are on page 1of 9

On Cyclic Numbers

Author(s): Solomon Guttman


Source: The American Mathematical Monthly, Vol. 41, No. 3 (Mar., 1934), pp. 159-166
Published by: Mathematical Association of America
Stable URL: http://www.jstor.org/stable/2302255
Accessed: 23-01-2016 15:16 UTC

Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at http://www.jstor.org/page/
info/about/policies/terms.jsp

JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of content
in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new forms of scholarship.
For more information about JSTOR, please contact support@jstor.org.

Mathematical Association of America is collaborating with JSTOR to digitize, preserve and extend access to The American
Mathematical Monthly.

http://www.jstor.org

This content downloaded from 130.240.43.43 on Sat, 23 Jan 2016 15:16:12 UTC
All use subject to JSTOR Terms and Conditions
1934] ON CYCLIC NUMBERS 159

Thus the bounding curves of Figure III correspondingto the toroidal sur-
face of our solid may be found point by point. Apparently these curves stop
abruptly at the points Ml"' and M2"'. However, these points are not "points
d'arret," but they are cusps of the complete curve of which the remainingpor-
tion M' ' N"'M2`' is the bounding curve of the hidden (back) side of the torus.
In fact this curve is a parelleltotheellipse into which the axial circle of the torus
is projected on the plane 7r.

ON CYCLIC NUMBERS
By SOLOMON GUTTMAN, Minneapolis, Minn.

Let N(k) representa numberof k digits,' d,d2 dk in a scale2 with "radix"


S; thatis
N(k) = d,SkA- +d2Sk-2 + * + dk-1S + dk.

Also let mN(k) denote the number of k digits, dm?ldm+2... dkdld2 di, ob-
the firstm digits of N(k) cyclically to the right. If M(^)
tained by transferring
is the number representedby the firstm digits of N(k), d,d2... di,,,then
(1) mN((k) = N(k)Sm - M(m)(Sk - 1).

It is to be understoodthat any of the digits may be zero, includingthe firstone


on the left.Thus if N(4) is 0032, 3N(4) is 2003; and if N(s) is 21053, 2N(s) is 05321.
If N(6)=857603,
2N(6) = 760385 = (857603 X 102) - 85(106 - 1),

and thiswould hold not only in the denary scale of notationbut in any notation
in which S is greaterthan any of the digits appearing.
I. The FundamentalPropertyof CyclicNumbers
If p is a primenumbernot a factorof S, then by Fermat's theoremSP-' -1
is divisible by p; or, in the congruencenotation, SP-' 1 (mod p). Letting Sk
representthe lowestpower of S such that Sk - 1 is divisible by p, we may write
(2) Sk - 1 = pC(k)

where C(k)is to be a numberof k digits. If p > S, C(k) will have one or more zeros
on the left. Thus 106-1 is divisible by 13, and we have 105-1=13X076923.
It is easily seen that C(k)is the "repetend"whenthe fraction1/pis reducedto
a repeatingdecimal, and that the digits of C(k) in order are the firstdigits ob-
tained in the quotient when any power of S is divided by p.
1 Throughout the paper, a subscript enclosed in parentheses will indicate the number of
digits in a number.
2 In the ordinarydenary scale of notation S is ten. While the paper is writtenforthe general
case, the reader will lose nothingby assuming that S is ten throughout.Note that in any scale of
S wouldbe writtenas 10.
notation,

This content downloaded from 130.240.43.43 on Sat, 23 Jan 2016 15:16:12 UTC
All use subject to JSTOR Terms and Conditions
160 ON CYCLIC NUMBERS [March,

Now divide Si, where 0 <i<k, by p, obtaining a quotient of i digits, Q(i),


and a remainderri<p; and we have
(3) ri = S- pQ(i.
We shall say that ri belongsto i, and that i is the index of ri. Note that when
i = k, Q(i) is exactly C(k), and ri= 1. Mlultiplying
both sides of (3) by C(k), we have
riC(k) = C(k)S' - Q(i)PC(k),

or, by (2)
rjC(k_)= C(k)Si - Q(i)(Sk - 1).

But since Q(i) consistsof the firsti digits of C(k), we have, from(1),
(4) ric(k) = iC(k);

and hence the


THEOREM: If Sk is the lowestpower of S such thatSk - I is divisibleby the
primep, Sk -1 = PC(k), and if ri is theremainderwhenSi is dividedbyp, 0 <i < k;
thentheeffect of multiplyingC(k) by ri is to transferi digitscyclicallyfromtheleft
of C(k) to theright.
Because of the relationship3expressed in this theorem,we may call C(k) a
cyclicnumber.
For example, if S is ten and p=7, we have k=6, and C(6)=(106-1)/7
=142857; r1=3 and hence 3X142857=428571=lC(6); r3=6 and hence
6X142857=857142=3C(6); etc. Again in the usual notation, with p=13, k=6,
C(6)=076923, r1=10 and 10X076923=769230=lC(6), r2=9 and 9X076923
=692307=2C(6), etc. In the septenary scale of notation (S=7), for p=5 we
have k=4, C(4)= (104-1)/5=1254, r2=4 and 4X1254=5412.
II. Completeand IncompleteCyclicNumbers
When S is a primitiveroot,4mod p, k will be p-1, and the set of remainders,
ri, will consist of the p-I integers1, 2, * *, (p- 1). In this case, C(k) = C(p_j)
will be called a complete cyclic number,and a cyclic permutationof its digits
will resultwhen it is multipliedby any positive integerless than p. But when S
is not a primitiveroot, mod p, k will be less than, and a factor of, p -1, say
p - 1 = nk. The set of remainderswill then consist of only k of the positive inte-
gers less than p. In this case C(k) may be called an incompletecyclic number.
Now let r(2) be some positive integerless than p and not in the set of remainders
ri. (It will be convenientto take r(2) as the smallestsuch integer,though this is

3 This theoremwas provedby a different


methodby R. E. Moritzin his paperOn products
whosedigitsare cyclicalpermutationsofthedigitsofthemultiplicand,this MONTHLY, vol. 34 (1927),
p. 33.
Theoryof Numbers,p. 65.
4 See Carmichael's

This content downloaded from 130.240.43.43 on Sat, 23 Jan 2016 15:16:12 UTC
All use subject to JSTOR Terms and Conditions
1934] ON CYCLIC NUMBERS 161

immaterial.)MultiplyingC(k) by r(2) the resultwill be a new number,C(


which is nota cyclic permutationof C(k), i.e.,

(5) r C (k) = C (k)

Now divide r(2)Si, where 0 <i < k, by p, denoting the quotient by Q(2) and the
remainderby r(i, so that

(6)(6) =r (2)Si _ Q(2)


ri~~~~~~~~~2
(2 (2) (2

Note that when i = k, Q(2=) =2C (2, and r(2 -=r(2); and that Q(2) consistsof
the firsti digits of C(2,. Multiplying(6) by C(k), and using (1), (2), and (5), we
have
(2) (2)
ri C(k) (k)

or

() (2)
7',:~~~~~~r
(2) (2)
(7) - C (k) = C(k)
rk(2)

We may call C(2) a co-cyclic number. It has the propertythat if it be multiplied


by the fractionr (2)Ir'2 its firsti digitscyclically
the resultwillbe to transfer
to the right. It will now be convenient in the case of incomplete cyclic num-
bers to use the superscript(1) to indicate the firstset of remaindersand the
cyclic number,i.e., ri= r(" and C((,= C<,.
If the 2k integersr7 and r'2 do not exhaust all the integersless than p, we
may take r'(3 as the smallest integernot in the two sets and, proceeding as be-
fore,obtaina thirdset r(3) and a newco-cyclicnumberCM. Ultimatelyone ob-
tainsn sets of k integerseach, r", i=1 2, , k and j=1, 2, , n; and n
co-cyclicnumbersC<(k of k digitseach; and forany i and j we have

(8) D) (1)
i C(k) =c(k)

or
(i)
W (
(9)(9) ~~~~~~~ri
co C(k)
i
C(k) .

As an example ofa completecyclicnumber,(10)6 - 1)/17 = 0588235294117647.


When this number is multipliedby any integerless than 17 its digits are per-
muted cyclically.
Since (106 -1)713 = 076923, we have in this case an incompletecyclic num-
ber. The numbers1, 3, 4, 9,10, and 12 are the remaindersof the firstset. Of the
remaining integers less than 13, the smallest is 2. Hence C(2 = 2 X076923
- 153846, and the integers2, 5, 6, 7, 8, and 11 make up the second set, Arranged
in the orderof indices, we have the table

This content downloaded from 130.240.43.43 on Sat, 23 Jan 2016 15:16:12 UTC
All use subject to JSTOR Terms and Conditions
162 ON CYCLIC NUMBERS [March,

i= 1 2 3 4 5 6

r'l. = 10 9 12 3 4 1 C(k = 076923


r2)= 7 5 11 6 8 2 CM = 153846
The index of 9 is 2, hence 9X076923 = 692307, 2 digits being transferred.The
index of 11 is 3, hence 3 digitsare transferred
when 153846 is multipliedby 11/2.
As another example, (105-1)/41 = 02439. Here k=5 and n =8, and we ob-
tain the followingtable:
1 2 3 4 5

j=1 10 18 16 37 1 02439
2 20 36 32 33 2 04878
3 30 13 7 29 3 07317
4 40 31 23 25 4 09756
5 9 8 39 21 5 12195
6 19 26 14 17 6 14634
7 28 34 12 38 11 26829
8 27 24 35 22 15 36585
By means of such a table and formula (8) we can multiplythe cyclic number
C(' by any integerless than p. For instance, to multiply02439 by 37 we note
that the index of 37 is 4 and transfer4 digits, 37X02439=90243. To multiply
02439 by 26, we see that 26 is in the 6th row with the index 2, and we transfer
2 digits of 14634, 26X02439=63414. If C(7 =26829 is multipliedby the frac-
7) (7)
tion r, /r','= 38/11, 4 digits will be transferred,(38/11) X 26829 = 92682.
Another group of sub-cyclicnumbers may be formed by dividing C(() by
some factorp', or dividingSk -1 by a compositefactor.These sub-cyclicnumbers
are essentiallythe same as the co-cyclicnumbersdescribed above.
I II. Multiplicationby CyclicNumbers
Let C(k) be the cyclic number (Sk- 1)/p, and let N be any positive integer.
Dividing N by p we have N=Qp+r, r<p. Then NC(k)=QPC(k)+rC(k)
=Q(Sk-1)+rCk=QSk+rCk-Q. The product rC(k) can be found as in the
precedingsection, and we have the following
Rule: To multiplyany numberN by a cyclicnumberC(k) = (Sk - 1)/p, divide
N byp; tothequotientQ annex theproductof C(k)and theremainderr; thensubtract
Q.
For example, to multiply 83495 by 142857, where 142857=(106-1)/7,
divide 83495 by 7. The quotient is 11927, and the remainder6 has the index 3.
Hence we write 83495X142857=11927857142-11927=11927845215. Again,
(106-1)/13=076923. To multiply 5362832 by 076923, we divide 5362832 by
13 obtaining the quotient 412525, and the remainder7. Using the table previ-
ously given for this case, we write 5362832X076923=412525538461-412525
= 412525125936.

This content downloaded from 130.240.43.43 on Sat, 23 Jan 2016 15:16:12 UTC
All use subject to JSTOR Terms and Conditions
1934] ON CYCLIC NUMBERS 163

In the duodecimal scale (S is twelve, and t and e representten and eleven


respectively) we have (106 -1)/7 = 186t35. To multiply 38e956 by 186t35, we
divide 38e956 by 7, obtainingthe quotient 65142 and the remainder4 withindex
2. Hence 38e956X186t35=651426t3518-65142=6514263t396.
To multiplyN by any cyclic permutationof C(k) or by any cyclic permuta-
tion of any of the associated co-cyclic numbers,we make use of (8), i.e., to
multiplyN by iC(k we firstmultiplyN by C") by the rule given above, and then
the result by r(l). Thus for p = 13, k=6, we have 4C6) =461538 = 076923 X 6.
Hence 5362832X461538=5362832X076923X6=412525125936X6
= 2475150755616.
IV. Division by CyclicNumbers
Let N be any positive integer to be divided by C(k) =(Sk-1)/p. Write
N=ASk+B(k), where B(k) consists of the k righthand digits of N and A the
remainingdigits. Then
N = A(Sk - 1) + A + B(k) = APC(k) + (A + B(k)).

We may considerthreecases.
Case I: A +B(k) < C(k). Then obviously the quotient is Ap and the remainder
is A +B(k). For example, we may divide 42938076583 by 142857, where 142857
=(106-1)/7. Here A=42938, B(6)=076583, and A+B(6)=119521<142857.
Hence the quotient is 42938X7=300566, and the remainderis 119521.
Case II: C(k)<A+B?(k)<Sk. Divide A+B(k) by C(k), A+B(k)=C(k)Q+R,
where Q<p and R<C(k). Then N=APC(k)+QC(k)+R=(Ap+Q)C(k)+R, the
quotient is Ap+Q and the remainderis R.
For example, to divide 86493756082 by 076923, where 076923 = (106 -1)713,
we have A =86493, B(6)=756082, A+B(6f)=842575=10X076923+73345.
Hence the quotient is (86493 X 13) +10 = 1124419 and the remainderis 73345.
Case III: A+B(k)>Sk. In this case we may writeA+B(k)=A'Sk+.B'(k)
=A'PC(k)+A'+B'(k) and N=(Ap+A'P)C(k)+A'+B'(k). This process may be
repeated as oftenas necessary, say t times,untilA (t) +B(') <Sk, and the prob-
lem is then reduced to Case I or II.
Thus, to divide 4836358743967215 by 076923, we have A=4836358743,
B(k) = 967215, A +B(k) = 4837325958,A'= 4837, B(k) = 325958, A'+B'k) = 330795
=4X076923+23103. Hence the quotient is (4836358743+4837)X13+4
=62872726544 and the remainderis 23103.
The mode of multiplicationand division describedabove can be extended to
factors of Sk+ 1 as well by changing certain signs.
V. The Even CyclicNumbers
A cyclic numberthat consists of an even numberof digits possesses certain
special propertiesofwhichwe shall considerhere only one or two that we believe
are not generallyknown.
In any numberN(2k) of the 2k digitsd1d2* d2k, let E(k) denote the number

This content downloaded from 130.240.43.43 on Sat, 23 Jan 2016 15:16:12 UTC
All use subject to JSTOR Terms and Conditions
164 ON CYCLIC NUMBERS [March,

that consists of the firstk digits djd2* * dk, and E(k) the numberthat consists
ofthe last k digitsdk+ldk+2 ... d2k, so that

N(2 k) = E(k)Sk + E(k).

If F(k) = (Sk- 1) -F(k), we maycall F(k) thecomplementof F(k). Note thateach


digit of F(k) is the complement of the corresponding digit of F(k), i.e.,
d-i= (S -1) -di.
Now let S2k be the lowest power of S such that S2k- 1 is divisible by p, and
let C(1))= (S2k_ 1)/p. Let XC(')' be any cyclic permutationof C(2)) or of any of
the associated co-cyclicnumbers,and let
(j)k
i C(2k) = E(k)S + E(k).

By (8), iC(()(2k) =rC wherer is some positive integerless than p. Since (S2k -1)
(1)
(2k)'I
=(Sk+1)(Sk-1), and Sk- 1 is not divisible by p by hypothesis,Sk?+ must
be divisible by p. Let Sk+ 1 = pQ(k), so that C(2))= Q(k)(Sk-1). Then
(10) ic rC(2k) = rQ((Sk - 1) = E(k)S + E(k)
or
Sk(rQ(k) - E(k)) = rQ(k) + E(k) > 0.

Hence
0< rQ(k) - E(k) = (rQ(k) + E'k))/Sk.

Since pQ() =Sk+l and r<p, rQ(k)<Sk; and also E'k) <Sk. Therefore
(rQ(k)?+E(k))/Sk<2, and
0< rQ(k) - E(k) < 2.
It followsthat rQ(k) -E(k) = 1, or
(11) r Q(k) = E(k) + 1.
Then, by (10),
(E(k) + 1)(Sk - 1) - E(k)Sk + E(k),

or
E(k) = (Sk - 1) - E(k) = (k);

and hence the


THEOREM: In any evencyclicnumberCs1), or any cyclicpermutationof such
a numberor of any ofits associatedco-cyclicnumbers,thelast k digitsare thecom-
plementsof thefirstk digits.
As examples, note the even cyclic and co-cyclicnumbersalre-dy cited such
as 076923, 153846, 0588235294117647, etc.

This content downloaded from 130.240.43.43 on Sat, 23 Jan 2016 15:16:12 UTC
All use subject to JSTOR Terms and Conditions
1934] ON CYCLIC NUMBERS 165

From (1 1) it is seen that E(k) + 1 is divisible by Q(k), or E(k) -1 (mod Qk)


Hence the following
THEOREM: In an evencyclicor co-cyclicnumber,Cs), or in any cyclicpermu-
tation thereof,any numberconsistingof k adjacent digits is congruentto -1,
moduloQ(k), or moduloany divisorof Q(O, whereQ(k) = (Sk+ 1)/p.
For instance, for p=7, C(6)=142857 and Q(3)=(103+1)/7=143=13X11.
Hence
142 _ 428 _ 285 _ 857 571 714 -1 (mod 143).
For p=13, C(' 076923, C =153846, and Q(3)=(103+1)/13=77. Hence
076 769 -692 = 923 -230 307- 153 =538 = -615 --1 (mod 77).

VI. Cyclic Congruences


From (1) it followsthat if x is any factorof Sk- 1, and N(k) is also divisible
by x, then any cyclic permutationof N(k) is divisible by x.
Thus 105-1=0 (mod 369) and 33579=0 (mod 369), and therefore35793
-79335=57933-0 (mod 369). Also 105-1=0 (mod 41), and 00041-0
(mod 41), hence 10004--0 (mod 41). Since 7 is a factor of 106-1, we have
21-100002-0 (mod 7).
Since Sk-1 is a divisor of Snk-1, any factorof Sk-1 is a factorof Snk-1.
Hence we have, more generally,that if x is a factorof Sk - 1 and of N(nk), it is
a factorof any cyclic permutationof N(nk). For instance, 13 is a factorof 106- 1
and of 104. Hence 104=40001=40000000001-(4XI10n-4)+1-- (mod 13).
VII. CyclicRemainders
Returningto (3) of Section I, we have, fori=m, n, and m+n respectively
(12a) Sm = pQ(m) + rm,
(12b) sn= PQ n) + rn,
(12c) Sm+n = PQ(m+n) + rm+n.

Multiplying (12a) and (12b) we have


Sm+n = pf[pQ(m)Q()+ rmQ(n) + rnQ(m)] + rmrn

and comparingthiswith (12c) we see that rmrn--rm+n


(mod p), or
(13) rmrn= pt + rm+n,
where
(14) t = Q(m+n) - PQ(m)Q(n- rmQ(n) - rnQ(m).

From (13), since rm+n<p, we see that t is the quotient when rmrn
is divided by
p. From (14) we have

This content downloaded from 130.240.43.43 on Sat, 23 Jan 2016 15:16:12 UTC
All use subject to JSTOR Terms and Conditions
166 ON CYCLIC NUMBERS [March,

Q (m+n) = (PQr(m) + rm)Q(n) + rnQ(m) + I

= (PQ(n) + rn)Q(m) + rmQ(m) + t

or
(15) Q(m+n) = Q(f)Sm + rnQ(m) + t = Q(m)Sn + rmQ(n) + t.

Expressed in words it means the following:If in the process of findinga cyc-


lic number Ck by dividing bok by p, we have one partial quotient of m digits
Q(m)with the remainderrm,and a second partial quotient of n digits Q(n) with
the remainderrn,we can multiplythe second quotient Q(n) by the firstremainder
rmand annex the product to the firstquotient Q(m),or vice versa; and then add-
ing to this the quotient t when the product of the remaindersrmrn is divided by
p, we geta newpartialquotientofm+n digits,Q(m+n).
If in (15) we put m=n, we have

(16) Q(2m) = Q(m)Sm + rmQ(m) + t,

i.e., ifwe multiplythe partial quotient Q(m)by the remainderrm,and annex this
product to this same quotient Q(m),and then add the quotient t obtained by
dividing rm2by p, the result will be the partial quotient Q(2m)of twice as many
digits. This, togetherwith the results of Section V about even cyclic numbers,
will greatly facilitate the writingdown of cyclic numbers that consist of a
large numberof digits.
A fewexamples will sufficeto illustratethe foregoing.
In computing C(6)=(106-1)/7 by dividing 106 by 7, we have Q(2)=14,
r2=2. We then annex 2X14=28 to 14, obtaining 1428, and this is Q(4) since
t =0 in this case. Also r4= r22=4. Now multiplying Q(2) by r4,and annexing the
product to Q(4), we have 142856; and since r2r4=8=(IX7)+1, we have t=1,
and adding this we have Q(6) = C(6) = 142857.
As an example in which therewill be real saving in computation,let us find
C(96) =(1096-1)/97. Here Q(2) = 01, r2= 3, and hence Q(4)= 0103 and r4= r22=9;
Q(8)= 01030927, r8= r42=81. Now r8= 81 is too large a number to operate with
easily, and so we choose to multiply Q(8) by r4= 9. Since r4r8= 729 = (97 X 7) +50,
we have r12=50, t=7, and hence Q(12)=010309278350. It is easily seen that if
r12= 50, ril= 5 since ri= 10. Hence we use Q(11) and ril= 5, and obtain r22= 25,
and, since t=0 in this case, Q(22)=0103092783505154639175. Since r22=625
- (97 X 6) +43, we have r44 = 43, and Q(44)will be obtained by annexing25 X Q(22)
+6 to Q(22) giving Q(44)=01030927835051546391752577319587628865979381.
Since r4r44=387=(97X3)+96, we annex r44Q(4)+3 to Q(44) and have Q(48)
=010309278350515463917525773195876288659793814432. And then, using
the property of even cyclic numbers we finally have Q(96)= C(96)= 01030927835-
05154639175257731958762886597938144329896907216494845360824742268041-
23711340206185567.

This content downloaded from 130.240.43.43 on Sat, 23 Jan 2016 15:16:12 UTC
All use subject to JSTOR Terms and Conditions

You might also like