Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

1.38. To see if a number, say 562437487, is divisible by 3, you just add up the digits of its decimalrepresentation, and see if the result is divisible by role="math" localid="1658402816137" 3.

( 5+6+2+4+3+7+4+8+7=46, so it is not divisible by 3).

To see if the same number is divisible by 11, you can do this: subdivide the number into pairs ofdigits, from the right-hand end(87,74,43,62,5) , add these numbers and see if the sum is divisible by11 (if it's too big, repeat).

How about 37? To see if the number is divisible by 37, subdivide it into triples from the end(487,437,562) add these up, and see if the sum is divisible by37 .


This is true for any prime pother than2 and 5. That is, for any prime p≠2,5, there is an integer rsuch that in order to see ifp divides a decimal number n, we breakn into r-tuples of decimal digits (starting from the right-hand end), add up these r-tuples, and check if the sum is divisible by p.

(a) What is the smallest rsuch for p=13? Forp=13 ?

(b) Show thatr is a divisor of p-1.

Short Answer

Expert verified
  1. The smallest “r” forp=13 and forp=17 are12,16 .
  2. "r" is a divisor of "p-1" is depicted.

Step by step solution

01

Step 1: Introduction to the Concept

A tuple is an ordered list (sequence) of elements with a finite number of elements. A sequence (or ordered list) of n elements is called an n-tuple, where n is a non-negative integer. Only one 0-tuple exists, which is referred to as the empty tuple.

02

Step 2: Solution Explanation

a)

Consider the following example where a decimal number "N" is required to divide up into "r" tuples:

Integer value is,NkNk1...N1

  • The above value is the same as multiplying each term by "10" to the power of "r" and then summing the results.

ThenN=N1+N2×10r+...+Nk×(10r)k-1

  • While takingNmodp

Nmodp=(N1+N2×10r+...+Nk×(10r)k-1)modp=N1+N2+...+Nk

Observation:10r=1modp-----(1)

  • By on "Fermat's Little Theorem"

10p1=1modp-----(2)

When comparing equations (1) and (2), the value of "r" is comparable to "p-1",

For p=13, the smallest "r" is:

r=p1=131=12

For p=17, the smallest "r" is:

r=p1=171=16

Hence, the smallest “r” for p=13 is 12and for p=17 is16 .

03

Step 3: Solution Explanation

b)

Take the integer "562437487" and the value of "p" to be "37".

  • If the value of "p" is "37" divide the integer value into triples from right to left, according to the stated statement.
  • As a result,562437487={487,437,562}; consequently, the "r" value is "3" in this case.
  • "r" denotes the number of tuples for which the decimal digits have been broken.

p1=371=36

  • Then "role="math" localid="1658403981019" 36mod3=0" indicating that "3" is the divisor of "36".

As a result, it can be seen that "r" is a divisor of "p-1".

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Calculate 2125mod127using any method you choose. (Hint: 127 is prime.)


Show that in any base b2, the sum of any three single-digit numbers is at most two digits long.

Let[m]denote the set{0,1,,m1}. For each of the following families of hash functions, say whether or not it is universal, and determine how many random bits are needed to choose a function from the family.

(a) H={ha1,a2:a1,a2[m]}, wheremis a fixed prime and

ha1·ha1,a2(x1,x2)=a1x1+a2x2modm

Notice that each of these functions has signatureha1,a2:[m]2[m]that is, it maps a pair of integers in[m]to a single integer in[m].

(b) His as before, except that nowm=2kis some fixed power of.2

(c) His the set of all functionsf:[m][m1].

Unlike a decreasing geometric series, the sum of the1,12,13,14,15,..... diverges; that is,i=1n1i=

It turns out that, for large n , the sum of the first n terms of this series can be well approximated as

i=1n1iInn+y

where is natural logarithm (log base e=2.718...) and y is a particular constant 0.57721...... Show that

i=1n1i=θ(logn)

(Hint: To show an upper bound, decrease each denominator to the next power of two. For a lower bound, increase each denominator to the next power of 2 .)

Wilson's theorem says that a numberis prime if and only if
(N-1)!=-1(modN).

(a) If is prime, then we know every number1x<p is invertible modulo . Which of thesenumbers is their own inverse?
(b) By pairing up multiplicative inverses, show thatrole="math" localid="1658725109805" (p-1)!=-1(modp) for prime p.
(c) Show that if N is not prime, then(N-1)!(modN) .(Hint: Considerd=gcd(N,(N-1)!.)
(d) Unlike Fermat's Little Theorem, Wilson's theorem is an if-and-only-if condition for primality. Why can't we immediately base a primality test on this rule?

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free