Homepage Solution manuals Ivan Niven An Introduction to the Theory of Numbers Exercise 3.6.1 (Four consecutive positive integers, each with the property that $r(n) = 0$)

Exercise 3.6.1 (Four consecutive positive integers, each with the property that $r(n) = 0$)

Find four consecutive positive integers, each with the property that r ( n ) = 0 .

Answers

Proof. A possible answer is

6 , 7 , 8 , 9 ,

because 3 6 and 3 is a prime of the form 4 k + 3 , 7 is also a prime of the form 4 k + 3 , 8 = 2 3 , with an exponent greater than 2 , and 3 9 .

Longer sequences are given by

18 , 19 , 20 , 21 , 22 , 23 , 24 ,

or

42 , 43 , 44 , 45 , 46 , 47 , 48 , 49 .

The following program, written in Sage, can be used.

def r(n):
    t = 0
    decomposition = True
    for p, alpha in factor(n):
        if (p == 2 and alpha >= 2) or (p % 4 == 3):
            decomposition = False
            break
        if p % 4 == 1:
            t += 1
    if decomposition:
        return 2^(t+2)
    else:
         return 0

User profile picture
2024-11-27 09:37
Comments