problem4

# problem4 - University of California San Diego ECE15...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: University of California San Diego ECE15: Engineering Computation Final Exam: Problem # 4 The digital root of a positive integer N is computed as follows. First, N is written-out in the decimal number system, and its digits are summed up to produce the number N 1 . Then the decimal digits of N 1 are summed to produce the number N 2 . And so on. The process continues until we obtain a single-digit decimal number, namely one of 1, 2, 3, 4, 5, 6, 7, 8, 9 . This single-digit decimal number is the digital root of N . For example, the computation of the digital root of the integer N 2 31 proceeds as follows: 2 31 2147483648 2 1 4 7 4 8 3 6 4 8 47 4 7 11 1 1 2 In this problem, we are interested in a variation on this theme, which we call the prime digital root . The prime digital root of a positive integer N is computed using the same process as above, except that the process stops either when a single-digit number is reached or when a prime number is reached. Thus if N is prime, then the prime digital root of N is N itself. On the other hand, if the process reaches a single-digit number which is not prime, namely one of 1, 4, 6, 8, 9 , then we say that...
View Full Document

{[ snackBarMessage ]}

### Page1 / 3

problem4 - University of California San Diego ECE15...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online