# Find the number of pairs of consecutive integers

#### anemone

##### MHB POTW Director
Staff member
Consider the set of integers ${1000,1001,1002,...1998,1999,2000}$.

There are times when a pair of consecutive integers can be added without "carrying": $1213 + 1214$ requires no carrying, whereas $1217 + 1218$ does require carrying.

For how many pairs of consecutive integers is no carrying required when the two numbers are added?

##### Well-known member
Re: Find the number of paris of consecutive integers

Consider the set of integers ${1000,1001,1002,...1998,1999,2000}$.

There are times when a pair of consecutive integers can be added without "carrying": $1213 + 1214$ requires no carrying, whereas $1217 + 1218$ does require carrying.

For how many pairs of consecutive integers is no carrying required when the two numbers are added?
For no carrying the 1st number cannot have a digit > = 5

so 1st digit = 1
2nd , 3rd and 4th digits =0 to 4 (any) = 5 choices

so number of pairs of numbers = 1 * 5 ^3 = 125

#### anemone

##### MHB POTW Director
Staff member
Re: Find the number of paris of consecutive integers

For no carrying the 1st number cannot have a digit > = 5

so 1st digit = 1
2nd , 3rd and 4th digits =0 to 4 (any) = 5 choices

so number of pairs of numbers = 1 * 5 ^3 = 125
What a great idea to tackle the problem! Well done, kaliprasad! #### Opalg

##### MHB Oldtimer
Staff member
Re: Find the number of paris of consecutive integers

For no carrying the 1st number cannot have a digit > = 5

so 1st digit = 1
2nd , 3rd and 4th digits =0 to 4 (any) = 5 choices

so number of pairs of numbers = 1 * 5 ^3 = 125
Neat solution! But I think there are a few other cases to add to the total, such as
Code:
1009     1999
1010     2000
____     ____
2019     3999
Those additions don't involve any carrying.

#### anemone

##### MHB POTW Director
Staff member
Re: Find the number of paris of consecutive integers

Oops!!!

First, I want to ask for forgiveness for saying kaliprasad's answer is correct without checking if it matched the correct answer...this isn't the first time I have made such a mistake, so I apologize for this and I want to also thank Opalg for chiming in and letting us know some cases are left out in the method submitted by our kind and capable user, kaliprasad.

Second, I see that the omitted cases may be determined if we consider the following three cases:

Case(I):

If we have the figure $9$ as the last digit, we see that we could have the following combination such that when we add two consecutive pairs of integers and no carrying is required, i.e. 1 _ _ 9,

we see that the second and third digit can be filled by any numbers from the set $\{0, 1, 2, 3, 4\}$, thus the number of cases that we obtained here is $5(5)=25$.

Case(II):

If we have the double digit 9 as the last two digits, i.e. 1 _ 9 9, then the cases that will meet the requirement of the problem or the only candidate that can fill the second digit must come from the set ${0, 1, 2, 3, 4}$, therefore we get $5$ additional candidates from this case.

Case(III):

For the last case, we have the configuration of 1 9 9 9 and obviously the only way to add two pairs of consecutive integers without carrying is when we add 1999 and 2000, so we have only one case here.

All in all, the total number $N$ of pairs of consecutive integers that when added involve no "carrying" is:

$N=125+25+5+1=156$.