6
Note on d^n (mod q) and an amusing result for trigonometric functions Citation for published version (APA): Rienstra, S. W. (1986). Note on d^n (mod q) and an amusing result for trigonometric functions. (WD report; Vol. 8605). Nijmegen: Radboud Universiteit Nijmegen. Document status and date: Published: 01/01/1986 Document Version: Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers) Please check the document version of this publication: • A submitted manuscript is the version of the article upon submission and before peer-review. There can be important differences between the submitted version and the official published version of record. People interested in the research are advised to contact the author for the final version of the publication, or visit the DOI to the publisher's website. • The final author version and the galley proof are versions of the publication after peer review. • The final published version features the final layout of the paper including the volume, issue and page numbers. Link to publication General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain • You may freely distribute the URL identifying the publication in the public portal. If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, please follow below link for the End User Agreement: www.tue.nl/taverne Take down policy If you believe that this document breaches copyright please contact us at: [email protected] providing details and we will investigate your claim. Download date: 07. Jun. 2020

Note on d^n (mod q) and an amusing result for ... · Rienstra, S. W. (1986). Note on d^n (mod q) and an amusing result for trigonometric functions. (WD report; Vol. 8605). Nijmegen:

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Note on d^n (mod q) and an amusing result for ... · Rienstra, S. W. (1986). Note on d^n (mod q) and an amusing result for trigonometric functions. (WD report; Vol. 8605). Nijmegen:

Note on d^n (mod q) and an amusing result for trigonometricfunctionsCitation for published version (APA):Rienstra, S. W. (1986). Note on d^n (mod q) and an amusing result for trigonometric functions. (WD report; Vol.8605). Nijmegen: Radboud Universiteit Nijmegen.

Document status and date:Published: 01/01/1986

Document Version:Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers)

Please check the document version of this publication:

• A submitted manuscript is the version of the article upon submission and before peer-review. There can beimportant differences between the submitted version and the official published version of record. Peopleinterested in the research are advised to contact the author for the final version of the publication, or visit theDOI to the publisher's website.• The final author version and the galley proof are versions of the publication after peer review.• The final published version features the final layout of the paper including the volume, issue and pagenumbers.Link to publication

General rightsCopyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright ownersand it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights.

• Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain • You may freely distribute the URL identifying the publication in the public portal.

If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, pleasefollow below link for the End User Agreement:www.tue.nl/taverne

Take down policyIf you believe that this document breaches copyright please contact us at:[email protected] details and we will investigate your claim.

Download date: 07. Jun. 2020

Page 2: Note on d^n (mod q) and an amusing result for ... · Rienstra, S. W. (1986). Note on d^n (mod q) and an amusing result for trigonometric functions. (WD report; Vol. 8605). Nijmegen:

report WD 86-05

Note on n

d (mod q) and an amusing result for trigonometric functions

S.W. Rienstra

December 1986

Wiskundige Dienstverlening Faculteit der Wiskunde en Natuurwetenschappen Katholieke Universiteit

Toernooiveld

6525 ED Nijmegen

The Netherlands

Page 3: Note on d^n (mod q) and an amusing result for ... · Rienstra, S. W. (1986). Note on d^n (mod q) and an amusing result for trigonometric functions. (WD report; Vol. 8605). Nijmegen:

Note on dn (mod q) and an amusing result

for trigonometric functions

S. W. Rienstra

Mathematics Consulting Department

Katholieke Universiteit Nijmegen, The Netherlands

December 1986

Page 4: Note on d^n (mod q) and an amusing result for ... · Rienstra, S. W. (1986). Note on d^n (mod q) and an amusing result for trigonometric functions. (WD report; Vol. 8605). Nijmegen:

Introduction

While playing with my pocket calculator some time ago, I found an amusing property of trigonometric

functions in degree mode . It amounts to the constancy of 10n (mod 360) for n ~3, and some related

results. These results and its generalisations are the subject of this note . Although similar relations for

other moduli are well known (for example, for 2,3,5,7,9,10,11,13, ... ; see [1], (9.5)), the one for 360, in

spite of its applicability to trigonometric functions, seems to have escaped attention, or, at least, seems

to have not yet been published. The same appears to be true for the generalisation to be presented here

(cf. [2]). I have published the present result partially, and in a very condensed form, as a puzzle in [3],

but by this note I would like to give it a wider audience.

Special case

If .n ~3, then

= 1000 + 360-fold, since 9000 = 25x360.

So

wn = 1000 = -80(mod 360) if n~3 ,

making

sin(lon) = -sin(80).

Similarly,

10n = 100(mod 180) if n~2,

making

tan(1on) = tan(100).

An immediate consequence is then:

consider a natural number x in decimal representation n

x = ~ ailOi i=O

then n

x = HP~ ai + 100a2 + 10a1 + a0 (mod 360). i=3

Obviously, the term 103~ai can be reduced further and further, down to -80 times a one-digit

number, in this way greatly simplifying the evaluation of sin(x) (or cos(x), or similarly tan(x) ) when x

is a large number.

-- 1 --

Page 5: Note on d^n (mod q) and an amusing result for ... · Rienstra, S. W. (1986). Note on d^n (mod q) and an amusing result for trigonometric functions. (WD report; Vol. 8605). Nijmegen:

General case

The above result can easily be generalised, and we investigate for which conditions dn is constant

(mod q) in n ";3k, for integers d, q ";31, and k ";30.

Theorem: dn = dk(mod q) for all n";3k if and only if ql(d-1)dk.

Proof: d=O and d=1 are trivial. If d*O,=;q :

(i). if dn = dk (mod q) for n ";3k, then in particular for n =k + 1

dk+ 1-dk = (d-1)dk = Nq for some N #.

(ii).if ql(d-1)dk and n";3k,then

dn-k 1 dn=dk+(d-1)dk - =dk(modq),

d-1

since (d-1)l(dn-k_1) # .

Assume from here on ql(d-1)dk. Let c denote the least non-negative residue of dn(mod q) . If

0 ~ dk < q, then c = dk; otherwise we can construct c as follows. Write d -1 = q IP b dk = q2[J 2

with q = q 1q2 and q"q2 > 0. This decomposition is unique, since (d-1,dk) = 1. Let pz denote the

least non-negative residue of p 2(mod q 1). Then

c = q2[Ji. .

It is not difficult to prove the corollaries, that c =0 if and only if

if ql(d-1) and q*l.

Now consider a number x, written as

x = y + dkx 0

, and c=1 if and only

with y <dk. Starting with x 0, we construct a sequence (x j) via repeated summation of the digits in base

d (where for the moment d is taken positive; this assumption can be relaxed).

no xo = L ao;d; ,

i=O

no nl

x, = L ao; = L a!idi , i=O i=O

Xm = amo ·

(Note that the sequence n0,nb···,nm = 0 decreases exponentially, since nj = [dlog Xj], and

Xj+! ~ (d -1)(nj + 1) ) . Then we have

x = y + dkx 1 = ... = y + cxm (mod q).

-- 2 --

Page 6: Note on d^n (mod q) and an amusing result for ... · Rienstra, S. W. (1986). Note on d^n (mod q) and an amusing result for trigonometric functions. (WD report; Vol. 8605). Nijmegen:

From the general result we can derive specific examples. Of course, for d=10, the cases q=360, k=3,

and q=180, k=2 follow readily, as well as the well-known q=3 and 9 (k=O) , and q=2' and 5'

(k =r) where 10n =0, showing that indeed here only the last r digits are significant. Furthermore, since

the present results are equally valid for d or a ;j negative , we recover the cases q=ll (k=O) with

d=-10, and q=7,11 and 13 (k=O) with d=-103; see [1], (9.5). Other interesting examples are : q=37

with d=103, q=101 with d=-102

, q=73 and 137 with d=-10\ and q=41 and 271 with d=105 (all

k=O). Useful in computer applications, with d=16 , may be: q=3 ,5 and 15 if k=O, and the rich col­

lection q=2,3 ,4,5,6,8,10,12,15,16,20, ... if k=l.

References

1 G.H. Hardy and E .M. Wright , An Introduction to the Theory of Numbers, 5th edition (1979),

Clarendon Press, Oxford.

2 L.E . Dickson, History of the Theory of Numbers, Volume I, Divisibility and Primality , 1952, Chel­

sea Publishing Company, New York.

3 S.W. Rienstra, Problem 718, Nieuw Archief Voor Wiskunde (4), Vol. 2, no .3 (1984), and (4), Vol.

4, no.l (1986).

-- 3 --