Homepage Solution manuals Ivan Niven An Introduction to the Theory of Numbers Exercise 3.6.3 (Maximum value of $r(n)$ for positive $n \leq 10000$)

Exercise 3.6.3 (Maximum value of $r(n)$ for positive $n \leq 10000$)

What is the maximum value of r ( n ) for positive n 10000 ?

Answers

Proof. Note that r ( 1105 ) = r ( 5 13 17 ) = 2 2 + 3 = 32 . If we want to improve this score, we must introduce a fourth prime of the form 4 k + 1 , the least of them being 29 . But 5 13 17 29 = 32045 > 10000 , thus the maximum value of r ( n ) for positive n 10000 is 32 . □

Check (with the function r ( n ) given in Problem 1):

nrec, maxi = 0, 0
for n in range(1,10001):
    rec = r(n)
    if rec > maxi:
        nrec = n
        maxi = rec
print(nrec, maxi)

      
       (1105, 32)

User profile picture
2024-11-27 10:17
Comments