If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Arithmetic progression applied to divisibility

Let's learn how to find the number of 3-digit numbers that are divisible by 7. Let's use this example to understand how to solve similar problems involving the application of arithmetic progressions to divisibility. Created by Aanand Srinivas.

Want to join the conversation?

Video transcript

find how many three-digit numbers are divisible by seven okay what seems relevant to me here is okay the fact that they need to be three-digit numbers and the fact that they have to be divisible by seven now the way I may start thinking about it is let me first look at all the numbers that are divisible by seven they let's say I start at seven sevens obviously divisible by seven and then there's 14 there's twenty-one and basically just going through with the seven tables 28 and eventually I know that I'll reach a point somewhere this the sequence will cross 100 and I'll reach this place where I get my first three-digit number and then I'll keep going that the sequence will keep going and it goes forever but definitely at some point it will reach the last three digit number and then it'll start becoming four digit numbers after that and it'll continue on it it doesn't care it just keeps going now what I can see is that this question wants me to find these numbers starting the first three three digit number and the last three digit number and then all the numbers including these two how many other is what the question is asking me now how can I approach this one way seems to be let me see if there's a pattern over here what I can see is that each of these numbers all the numbers that are divisible by seven are actually differing by seven which makes sense to me because that's how I define divisibility I started a multiple of seven I keep adding some and I'll keep hitting multiples of seven in other words all these numbers will be divisible by seven right and so I keep I started seven in fact actually I'm starting at zero 0 is divisible by seven so I'm starting at zero and then jumping steps of seven all the way at some point I'll reach my first three-digit number and then in some boiled H my last 3 is a three-digit number if I have these two numbers then I know that I can find how many are in between them because I know that between them you're only jumping steps of seven so all I have to count after that is how many steps of seven are between these two numbers and I'm done am I making sense so find the first fine the last then you can find how many steps of seven are there between these two numbers you actually have every all the pieces of information you need to solve this problem so go ahead and find these two and let's do this together after that now if you are done I'm going to try and guess what the first three three digit number is and the way I think of doing it is I know seventy is two digits and then I know that after that 105 like 35 more if I had 105 is the first one because before that it's 98 so I can just just by trying it out I know that in this case 105 is my first three-digit number I think this is the way to do it I don't know if there's any proper way you just go near 100 and then see what's closest to it over here I have to look at thousand because thousands my first folds it number I have to see something before that the way I want to do it is maybe go to 700 and then I know 28 goes so 280 will go so 700 plus 280 that's 980 so I've come close 980 plus 7 is 9 87 that's another seven will be 9 94 after that will be thousand 1 so 994 is my last three-digit number now I'm gonna get these two now all I have to do is find this space between them there is a space between them that I can find just by subtracting these two numbers which I'm going to do right now so 994 - hundred and five 994 - 100 is 894 let's write 894 minus 5 is 889 894 minus 5 that's 889 yes I that's correct so now I know this gap I know that I'm jumping steps of seven so basically this is like asking me how many lines of length seven are there in a length of 889 there are some lengths of seven some lines line segments rather of length 7 how many are they how can you find out this is what we invented division 4 right to solve a problem like this what is divide so I can just do 889 divided by 7 / seven and that'll give me what I want which is the number of such lines that are there of length seven in a length of 889 and I'm sure this will go because I know that this is made up of just lines of seven right like jump seven all the time this gap has to be a multiple of seven so this will definitely give me a whole number so 789 divided by seven how would I do this I'll say in eight it goes once and then I'll have a 1 left and an 18 it'll go twice then I'll have four left and 49 it'll go seven times and I'm almost done here if I stop here I've made one small mistake it's an off by one error what mistake I've made is that I've found the number of such lines there are 127 such lines here but other questions asking me how many three-digit numbers there includes also this first term because if I just count 127 that'll be 1 2 3 all these pieces all the way up till the last piece 127 pieces another 127 numbers that are divisible by 7 but we wouldn't have counted the first one so we have to add 1 so they also count hundred and five that gives us a grand total of 128 numbers that are divisible by 3 sorry divisible by 7 but have three digits in them now this is in the chapter called arithmetic progression so you may be wondering why actually if you notice what you've done here is an arithmetic progression like problem but we just didn't use the standard terms that people use with it so I'm also want to show that if you're comfortable with those then we can we can actually write it in that format that way of doing the problem is very similar what you will do is you will say that oh all numbers differ or there's a difference between them that 7 and that's constant so this is an arithmetic sequence or an arithmetic progression and then you say that the first term that I care about actually first time can be anywhere you start over here because the question asks you to only focus on three-digit numbers and then you will say my first digit my first number that I care about in the sequence is higher than 5 so that's my first term my common difference D equals 7 because we're dealing with the divisibility of 7 divisibility by 7 and then you say my last term that I about because after that it's all four digits is my 994 what I want to find is my n equal to how much and when you do it this way you can write you can use the relation that you may already know a plus n minus 1 times D equals my last term or nth term rather n minus 1 D will give me my nth term and if you do this you will get the exact same answer you will do 105 plus n minus 1 into 7 equals 994 that is one equation with just one unknown you can go ahead and solve it and you will get n equals this minus this 9 94 minus 105 which is 8 18 9 just kind of what we got over here that's the gap basically you're finding and then you will divide that by 7 when you're doing this you will be finding how many lines of seven sighs seven are there in this gap and to include the first digit you will be adding a plus one because it's n minus one here this one and you will get without a doubt 128 now this is not just the way to solve this question there are many questions you get like this find the number of four-digit numbers that are divisible by something else or find the number of digits a number of the numbers that are divisible by four that lie between some two numbers so you'll always be given a starting point and an ending point and some jump size and that's all you have to find once you know a starting point the ending point and the jump size you can always find the number of terms so in this case the starting point is 105 the ending point is 9 94 and the jump size given is plus 7 that's all actually matters after that it becomes an arithmetic progression problem