Homepage Solution manuals Ivan Niven An Introduction to the Theory of Numbers Exercise 4.4.24* (Sum of the first $n$ terms of the sequence $0, 1, 1,2,2,3,3,4,4,\ldots$)

Exercise 4.4.24* (Sum of the first $n$ terms of the sequence $0, 1, 1,2,2,3,3,4,4,\ldots$)

Let f ( n ) be the sum of the first n terms of the sequence 0 , 1 , 1 , 2 , 2 , 3 , 3 , 4 , 4 , . Construct a table for f ( n ) . Prove that f ( n ) = n 2 4 . For integers x and y with x > y , prove that xy = f ( x + y ) f ( x y ) . Thus the process of multiplication can be replaced by an addition, a subtraction, looking up two numbers in the table, and subtracting them.

Answers

Proof.

Some values of f ( n ) :

n 1 2 3 4 5 6 7 8 9 10 u n 0 1 1 2 2 3 3 4 4 5 f ( n ) 0 1 2 4 6 9 12 16 20 25

By convention, we define f ( 0 ) = 0 .

(a)
We note that u n = n 2 for all n , and f ( n ) = k = 1 n u k = k = 1 n k 2 (1)

We shaw first that for all n ,

n 2 = n 2 4 ( n 1 ) 2 4 . (2)

We write n = 2 q + r , where r = 0 or r = 1 . Then

n 2 4 ( n 1 ) 2 4 = ( 2 k + r ) 2 4 ( 2 k + r 1 ) 2 4 = ( q 2 + qr + r 2 4 ) ( q 2 + q ( r 1 ) + ( r 1 ) 2 4 ) = q ( since  r { 0 , 1 } ) = n 2 .

(So a discrete primitive of n 2 is n 2 4 .)

Therefore, for all n

f ( n ) = k = 1 n k 2 4 k = 1 n ( k 1 ) 2 4 = k = 1 n k 2 4 k = 0 n 1 k 2 4 = n 2 4 .

This shows that for all n ,

f ( n ) = k = 1 n k 2 = n 2 4 . (3)
(b)
We write x = 2 q + r , y = 2 p + s , r , s { 0 , 1 } . Then by (1), f ( x + y ) f ( x y ) = ( x + y ) 2 4 ( x y ) 2 4 = [ 2 ( q + p ) + ( r + s ) ] 2 4 [ 2 ( q p ) + ( r s ) ] 2 4 = { ( q + p ) 2 + ( q + p ) ( r + s ) + ( r + s ) 2 4 } { ( q p ) 2 + ( q p ) ( r s ) + ( r s ) 2 4 } = 4 pq + 2 qs + 2 pr + ( r + s ) 2 4 ( r s ) 2 4 .

Moreover

( r + s ) 2 4 ( r s ) 2 4 = rs ,

since both members are 0 if r = 0 or s = 0 , and both are 1 if r = s = 1 . Therefore

f ( x + y ) f ( x y ) = 4 pq + 2 qs + 2 pr + rs = ( 2 q + r ) ( 2 p + s ) = xy .

This shows that

f ( x + y ) f ( x y ) = xy ( x > y > 0 ) .

For instance, using the preceding table

6 4 = f ( 6 + 4 ) f ( 6 4 ) = f ( 10 ) f ( 2 ) = 25 1 = 24 .

No need to learn multiplication tables anymore ! □

User profile picture
2025-03-04 10:06
Comments