Homepage Solution manuals Ivan Niven An Introduction to the Theory of Numbers Exercise 4.1.34* ($\nu_p \binom{a+b}{a}$ is the number of carries when $a,b$ are added base $p$ (Kummer))

Exercise 4.1.34* ($\nu_p \binom{a+b}{a}$ is the number of carries when $a,b$ are added base $p$ (Kummer))

Let a and b be positive integers withs a + b = n . Show that the power of p dividing ( n a ) is exactly the number of carries when a and b are added base p .

Answers

Proof. We write a , b and n = a + b in base p in the form

a = i = 0 k a i p i , b = i = 0 k b i p i , n = a + b = i = 0 k c i p i .

(Here k is any integer greater than the lengths of the representations of a , b , n in base p .)

The Legendre- de Polignac’s formula gives

ν p ( n a ) = i = 1 k ( n p i a p i b p i ) , (1)

since n p i = a p i = b p i = 0 if i > k .

We proved in Problem 33 (with d = p ) that the carries r i such that

r 0 = 0 (2) { r i + 1 = a i + b i + r i p = ( a i + b i + r i ) p , c i = ( a i + b i + r i ) p r i + 1 = ( a i + b i + r i ) % p , (3)

satisfy

j = 0 i a j p j + j = 0 i b j p j = j = 0 i c j p j + r i + 1 p i + 1 ( i = 0 , 1 , , k ) . (4)

Since r i = 0 or r i = 1 for all indices i (and r 0 = 0 ), the number N of carries when a and b are added in base p is given by

N = i = 0 k + 1 r i = i = 1 k + 1 r i = i = 0 k r i + 1 . (5)

Then the equalities (4) give

N = i = 0 k r i + 1 (6) = i = 0 k 1 p i + 1 ( j = 0 i a j p j + j = 0 i b j p j j = 0 i c j p j ) . (7)

If i = k , j = 0 i a j p j + j = 0 i b j p j j = 0 i c j p j = a + b n = 0 , so

N = i = 0 k 1 1 p i + 1 ( j = 0 i a j p j + j = 0 i b j p j j = 0 i c j p j ) . (8)

We proved in Problem 33 (see formula (4) of Problem 33) that

{ a p i + 1 } = 1 p i + 1 j = 0 i a j p j , { b p i + 1 } = 1 p i + 1 j = 0 i b j p j , { n p i + 1 } = 1 d i + 1 j = 0 i c j p j . (9)

Then formulas (8) and (9) give

N = i = 0 k 1 ( { a p i + 1 } + { b p i + 1 } { n p i + 1 } ) = i = 0 k 1 ( a p i + 1 a p i + 1 + b p i + 1 b p i + 1 n p i + 1 + n p i + 1 ) = i = 0 k 1 ( a p i + 1 a p i + 1 + b p i + 1 b p i + 1 n p i + 1 + n p i + 1 ) = i = 0 k 1 ( a p i + 1 b p i + 1 + n p i + 1 ) ( since  a + b = n ) = j = 1 k ( n p j a p j b p j ) ( j = i + 1 ) = ν p ( n a ) ( by (1)) .

In conclusion,

N = i = 0 k + 1 r i = ν p ( n a )

is exactly the number of carries when a and b are added base p . □

User profile picture
2025-01-06 09:24
Comments