Age Word Problems

Every now and then, we encounter word problems that require us to find the relationship between the ages of different people. Age word problems typically involve comparing two people’s ages at different points in time, i.e. at present, in the past, or in the future.

This lesson is divided into two parts. Part I involves age word problems that can be solved using a single variable while Part II contains age word problems that need to be solved using two variables .

Let’s get familiar with age word problems by working through some examples.

PART I: Age Word Problems Solvable with One Variable

Example 1: Tanya is 28 years older than Marcus. In 6 years, Tanya will be three times as old as Marcus. How old is Tanya now?

In this problem, we are only asked to find Tanya’s current age. However, the problem also gave us a lot of other information which can be overwhelming. To help us organize the important details, let’s create a table to list what we know so far.

Since we are only given details about their current ages and what they will be 6 years from now, we’ll go ahead and gray out the Past column.

Table with the past column grayed out while the Future column are for their ages in 6 years

You may notice that Tanya’s current age is defined using the age of Marcus. However, Marcus’s present age is currently unknown. So let’s express Marcus’s age using the variable x . Since Tanya is 28 years older than Marcus , then Tanya’s present age must be x+28 .

Under the Present column, Tanya's age is x+28 while Marcus' age is x

Next, let’s fill in the Future column which will consist of their ages in 6 years. All we have to do is add 6 to Tanya and Marcus’s present or current ages. Therefore, we have:

Under the Future column, Tanya's age in 6 years will be x+34 while Marcus' age will be x+6

Now that our table is filled out, we can go ahead and create our equation based on the information provided. The problem states the following:

In 6 years , Tanya will be three times as old as Marcus.

Here we are trying to find the relationship between their ages in the future. We can simply say that,

Tanya’s age in 6 years = 3( Marcus’s age in 6 years )

With that in mind, we can easily construct our equation.

x+34=3(x+6)

Our next step now is to solve for x . But before that, remember that our problem is asking us to find Tanya’s current age. Since Tanya’s age is defined using Marcus’s current age (which is x ), we have to find his age first in order to determine what Tanya’s present age is.

x+34=3(x+6) → x=8

Now that we have the value for x , let’s find out what Tanya and Marcus’s current ages are. We can do this by simply replacing the x ‘s with 8 .

CURRENT AGES (present)

Going back to the problem’s question, how old is Tanya now?

Answer: Tanya is 36 years old.

Answer Check:

At this point, we are confident that our answer is correct. But, how can we be 100% sure? Well, it’s always a good idea especially in math, to check our answers so we’re certain that we got the correct values.

For this problem, we can simply verify if our answer makes our future statement true. Do you remember this statement?

In 6 years, Tanya will be three times as old as Marcus.

We know the present ages of Marcus and Tanya which are 8 and 36 , respectively. Hence in 6 years, Marcus will be 14 years old while Tanya will be 42 years old.

So, will Tanya be three times as old as Marcus in 6 years? The answer is Yes .

If multiplied by 3, Marcus' age of 14 will equal to 42 which is Tanya's age; 3(14)=42

Example 2: Bruce is 4 years younger than Hector. Twenty years ago, Hector’s age was 13 years more than half the age of Bruce. How old are they now?

By just reading the problem, we can already tell that there is a great deal of information that we have to sort through and that this problem includes a fraction. Most students easily get lost in all the given information, let alone solving equations that involve fractions. But, don’t fret! As long as you stick with the basic principles and steps on how to solve age word problems, you’ll be fine.

Right now, we don’t know Bruce or Hector’s current age. But since Bruce’s age is expressed in relation to Hector’s age, then our unknown variable will be based on Hector’s age. In other words,

Let’s organize all these important data into a table. We’re only given details about their present and past (20 years ago) ages so we’ll gray out the Future column.

A table with the Future column grayed out and the Past column are for their ages 20 years ago. Under the Present column, Bruce's age is h-4 while Hector's age is h.

Twenty years ago, both Bruce and Hector were 20 years younger so we’ll subtract 20 from each of their present ages.

Under the Past column, Bruce's age is h-24 and Hector's age is h-20.

Our table is now ready so we can proceed to create our equation. As you can see under the Past column, we were able to create algebraic expressions for Bruce and Hector’s ages 20 years ago. But our problem also told us that,

Twenty years ago , Hector’s age was 13 years more than half the age of Bruce.

Since Hector’s age 20 years ago is also 13 years more than half of Bruce’s age, we can take these two algebraic expressions and set them equal to each other, to create an equation.

Hector’s age 20 years ago = \Large{1 \over 2} ( Bruce’s age 20 years ago ) + 13

h-20=(1/2)(h-24)+13

We’re now ready to solve for the unknown variable, h .

h-20=(1/2)(h-24)+13 → h=24

Therefore, Hector’s present age is {\textbf{42}} years old.

On the other hand, you may recall that Bruce’s current age is: h - 4 . Since h = 42 , then Bruce’s current age is 42 - 4 = {\textbf{38}} .

So, how old are they now?

Answer: Hector is 42 years old and Bruce is 38 years old .

The final step is to check our answers by substituting the unknown values into our original equation to verify if each side of the equation equals the other.

42-20=(1/2)(42-24)+13 → 22=(1/2)(18)+13 → 22=22

Great! Our answer checks. This just showed us that if we take Bruce’s age twenty years ago, which is 18, and divide it in half, we get 9. Adding 13 to that ( 9 + 13 ), we get 22 which was Hector’s age twenty years ago.

Therefore, we are able to confirm that twenty years ago when Hector was 22 years old and Bruce was 18 years old, Hector’s age was 13 years more than half the age of Bruce.

Example 3: Stella is 13 years younger than Kwame. Nine years from now, the sum of their ages will be 43. Find the present age of each.

This problem is a little different from our previous two examples as we are given the sum of their ages in 9 years. But right off the bat, we can see that Stella’s age is defined in terms of Kwame’s age. Therefore, we’ll select a variable to represent Kwame’s current age. In this instance, let’s use “ k “.

A table with the Present column showing the variable k as Kwame's age and k-13 for Stella's present age. The Past column is grayed out while the Future column are for their ages in 9 years.

Nine years from now, both Kwame and Stella will be 9 years older. So we’ll simply add 9 to their present ages above to show their future ages.

Let’s complete our table.

Future age (in 9 years) for Kwame is k+9 while Stella's is k-4

Now that we have the algebraic expressions for both their ages in 9 years, we can add these expressions to create our equation. We were given the following details:

Nine years from now , the sum of their ages will be 43 .

So we have,

(k+9)+(k-4)=43 → k=19

Checking back at our table, k stands for Kwame’s age. But since our problem asked us to find the current ages for both, let’s do a little bit more solving.

Answer: Kwame is 19 years old and Stella is 6 years old .

Let’s now verify if indeed the sum of Kwame and Stella’s ages in 9 years will be 43.

28+15=43 → 43=43

Perfect! The total of their ages nine years from now is 43 so our answers are correct.

Example 4: Mr. Cook is 34 years old. His son is 22 years younger than him. In how many years will Mr. Cook’s age be 24 years less than three times as old as his son?

We already know their current ages, so before we delve any further, let’s start filling in our table.

Table with the Present column showing Mr. Cook's age as 34 and the son's age as 12.

Note that since the son is 22 years younger than Mr. Cook, we subtracted 22 from 34 to get his son’s current age, 34 - {\color{red}22} = 12 .

This problem is unique because it’s not asking us for their ages at a certain point in time like usual. Instead, it asks us to find out the number of years when Mr. Cook’s age will meet a certain relationship with his son’s age in the future.

But at this point, we don’t know how long it will take for Mr. Cook to be 24 years less than three times as old as his son. So, let’s assign the unknown variable “ x ” to stand for the number of years then add x to both of their current ages to create algebraic expressions that will represent how old they will be after x years.

A table showing that in x years, Mr. Cook's age will be x+34 while his son's age will be x+12

Since Mr. Cook’s age after x number of years ( x + 34 ) will also be 24 years less than three times as old as his son , we can set these two algebraic expressions equal to each other, thus creating our equation.

x+34=3(x+12)-24

Now that we have our equation, let’s solve for x .

x+34=3(x+12)-24  → x=11

As you may recall, x stands for the number of years from now that will take for Mr. Cook to be 24 years less than three times as old as his son. Therefore,

Answer: In 11 years , Mr. Cook’s age will be 24 years less than three times as old as his son.

To check if our answer is correct, we must first find out how old will Mr. Cook and his son be in 11 years. Substituting the value of x which is 11 into our algebraic expressions, we get:

So in 11 years, Mr. Cook will be 45 years old while his son will be 23 years old.

This time, I’ll leave it up to you to verify if indeed during that time, his age of 45 years old will be 24 years less than three times as old as his son. If it meets the condition, then our answer is correct.

Example 5: The sum of one-fifth of Annika’s age four years ago and half of her age in six years is 33. How old is she now?

Compared to our previous exercises, this problem only involves one person. Also, instead of comparing the ages of two people at a certain point in time, we will be comparing Annika’s ages at different points in time, i.e. 4 years ago and in 6 years.

We don’t know Annika’s current age so let’s select the variable {\textbf{\textit{a}}} to represent this unknown value. We’ll use this variable as well to create algebraic expressions that will stand for her past and future ages.

A table showing Annika's age 4 years ago as a-4, her present age as a, and her age in 6 years as a+6.

Our problem also told us that if we add \Large{1 \over 5} of Annika’s age 4 years ago and \Large{1 \over 2} of her age 6 years from now , the sum is 33 .

With this information, it’s easy for us to write our equation.

(1/5)(a-4)+(1/2)(a+6)=33

Our next step is to solve for the unknown variable, a .

(1/5)(a-4)+(1/2)(a+6)=33 → a=44

So, how old is Annika now?

Answer: Annika is currently 44 years old.

As I mentioned before, it’s always a good practice to verify if you got the correct answer. To start, let’s find out what Annika’s past and future ages are.

Now that we know how old she was 4 years ago and how old she’ll be in 6 years, we’ll plug in these values into our original equation to see if both sides of the equation equal each other.

(1/5)(40)+(1/2)(50)=33 → 33=33

And they did! We were able to prove that the sum of \Large{1 \over 5} of Annika’s age 4 years ago and \Large{1 \over 2} of her age 6 years from now is indeed 33.

PART II: Age Word Problems Solvable with Two Variables

Example 6: The sum of Aaliyah and Harald’s ages is 28. Four years from now, Aaliyah will be three times as old as Harald. Find their present ages.

Neither Aaliyah nor Harald’s age is expressed in terms of the other. So for this problem, we will be using more than one variable to represent the unknown values. To start,

Since they will be 4 years older in the next 4 years, we simply have to add 4 to their current ages to represent their future ages.

Age word problem table showing Aaliyah's current age as a and her age in 4 years as a+4. Meanwhile, Harald's current age is represented by the variable h and his age in 4 years as h+4.

Looking back at our problem, there are two significant statements that can help us find our answers.

1) The sum of Aaliyah and Harald’s ages is 28.

From this statement, we can create the equation below:

a+h=28

2) Four years from now, Aaliyah will be three times as old as Harald.

Meanwhile, the statement above can be translated into the following equation:

a+4=3(h+4)

We now have two equations to solve.

First, we’ll use equation 1 to solve for a .

a=28-h

Next, we’ll replace a with 28 - h in equation 2 .

a+4=3(h+4) → 28-h+4=3h+12 → h=5

Perfect! We are able to find the values for both our unknown variables, a and h , which also stand for the present ages for Aaliyah and Harald. So we have,

Answer: Currently, Aaliyah is 23 years old while Harald is 5 years old.

I’ll leave it up to you to check if our answers are correct. But as you can see, even with just using mental computation, we can already tell that the sum of Aaliyah and Harald’s ages is 28 ( 23 + 5 = 28 ) which makes our first statement true. You may further check our answers by plugging in the values of a and h into equation 2 to verify if the left side of the equation equals the right, thus making our second statement true as well.

Example 7: The sum of the ages of Jaya and Nadia is three times Nadia’s age. Seven years ago, Jaya was three less than four times as old as Nadia. How old are they now?

This problem is similar to our previous example. However, for this one, we are not given the exact number for the sum. We first have to find out each of their current ages so we can determine what the sum is.

We then need to subtract 7 from their current ages to represent how old they were seven years ago.

A table showing Jaya's present age as y and her age 7 years ago as y-7. On the other hand, Nadia's present age is represented by n and her age 7 years ago as n-7.

Now that we’ve organized our data, let’s go through the significant statements given in our problem and translate each into an equation.

1) The sum of the ages of Jaya and Nadia is three times Nadia’s age.

y+n=3n

2) Seven years ago, Jaya was three less than four times as old as Nadia.

y-7=4(n-7)-3

Therefore, our two equations are:

Let’s first focus on equation 1 and solve for y .

y=2n

Now we’ll solve for n using the value of y from equation 1. We’ll do this by replacing y with 2n in equation 2 .

y-7=4(n-7)-3 → 2n-7=4n-28-3 → n=12

Taking the values of y and n , we have:

So, going back to our problem. How old are they now?

Answer: Jaya is 24 years old and Nadia is 12 years old.

To check our answers, we’ll replace the values of y and n in equation 1 and equation 2. Again, I’ll leave it up to you to solve both equations and verify if each side of the equation equals the other. Once you’re done with your solutions, you’ll see that we are able to prove that both statements from our problem are true.

Example 8: The difference between the ages of Penelope and her son, Zack, is 34. In six years, Penelope will be four times as old as Zack’s age two years ago. How old are they now?

It’s easy to get lost in all the information given so we’ll focus first on assigning variables that will stand for the unknown values.

One thing that’s unique about this problem is that it involves three different points in time. We are given not only the relationship between Penelope and her son’s age in the present time but also how their ages in 6 years are related to their ages two years ago.

To show this, we’ll subtract 2 from their ages now for their ages 2 years ago then add 6 to their current ages for their ages 6 years later .

A table showing Penelope's present age as p, her age 2 years ago as p-2, and her age in 6 years as p+6. Meanwhile, Zack's current age is represented by the variable, z, his past age as z-2, and his age in 6 years as z+6.

Great! We now have variables and algebraic expressions to represent Penelope and Zack’s current ages as well as their ages in the past and in the future. Moving forward, let’s go through the important details given in the problem and create an equation from each statement.

1) The difference between the ages of Penelope and her son, Zack, is 34 .

Remember that Penelope is Zack’s mother so she’s definitely older than him. Therefore, we are subtracting Zack’s age from Penelope’s age to find the difference.

p-z=34

2) In six years, Penelope will be four times as old as Zack’s age two years ago.

p+6=4(z-2)

Here are our two equations:

Let’s now work on equation 1 to solve for p .

p=34+z

Next, we’ll replace p with 34 + z in equation 2 then solve for z .

p+6=4(z-2) → 34+z+6=4z-8 → z=16

How about we replace the unknown values in our table and also find out what their past and future ages are?

Penelope was 48 years old 2 years ago and will be 56 years old in 6 years. On the other hand, Zack was 14 years old 2 years ago and will be 22 years old in 6 years.

Going back to our original question, how old are they now?

Answer: Penelope is currently 50 years old while her son, Zack, is 16 years old.

age math equation problem solving

Here are some examples for calculating age in word problems.

Phil is Tom's father. Phil is 35 years old. Three years ago, Phil was four times as old as his son was then. How old is Tom now?

First, circle what it is you must ultimately find— how old is Tom now? Therefore, let t be Tom's age now. Then three years ago, Tom's age would be t – 3. Four times Tom's age three years ago would be 4( t – 3). Phil's age three years ago would be 35 – 3 = 32. A simple chart may also be helpful.

Now, use the problem to set up an equation.

age math equation problem solving

Therefore, Tom is now 11.

Lisa is 16 years younger than Kathy. If the sum of their ages is 30, how old is Lisa?

First, circle what you must find— how old is Lisa? Let Lisa equal x . Therefore, Kathy is x + 16. (Note that since Lisa is 16 years younger than Kathy, you must add 16 years to Lisa to denote Kathy's age.) Now, use the problem to set up an equation.

age math equation problem solving

Therefore, Lisa is 7 years old.

Previous Number Problems

Next Motion Problems

has been added to your

Reading List!

Removing #book# from your Reading List will also remove any bookmarked pages associated with this title.

Are you sure you want to remove #bookConfirmation# and any corresponding bookmarks?

Logo for BCcampus Open Publishing

Want to create or adapt books like this? Learn more about how Pressbooks supports open publishing practices. -->

Chapter 7: Factoring

7.9 Age Word Problems

One application of linear equations is what are termed age problems. When solving age problems, generally the age of two different people (or objects) both now and in the future (or past) are compared. The objective of these problems is usually to find each subject’s current age. Since there can be a lot of information in these problems, a chart can be used to help organize and solve. An example of such a table is below.

Example 7.9.1

Joey is 20 years younger than Becky. In two years, Becky will be twice as old as Joey. Fill in the age problem chart, but do not solve.

Using this last statement gives us the equation to solve:

B + 2 = 2 ( B − 18)

Example 7.9.2

Carmen is 12 years older than David. Five years ago, the sum of their ages was 28. How old are they now?

Filling in the chart gives us:

The last statement gives us the equation to solve:

Five years ago, the sum of their ages was 28

[latex]\begin{array}{rrrrrrrrl} (D&+&7)&+&(D&-&5)&=&28 \\ &&&&2D&+&2&=&28 \\ &&&&&-&2&&-2 \\ \hline &&&&&&2D&=&26 \\ \\ &&&&&&D&=&\dfrac{26}{2} = 13 \\ \end{array}[/latex]

Therefore, Carmen is David’s age (13) + 12 years = 25 years old.

Example 7.9.3

The sum of the ages of Nicole and Kristin is 32. In two years, Nicole will be three times as old as Kristin. How old are they now?

In two years, Nicole will be three times as old as Kristin

[latex]\begin{array}{rrrrrrr} N&+&2&=&3(34&-&N) \\ N&+&2&=&102&-&3N \\ +3N&-&2&&-2&+&3N \\ \hline &&4N&=&100&& \\ \\ &&N&=&\dfrac{100}{4}&=&25 \\ \end{array}[/latex]

If Nicole is 25 years old, then Kristin is 32 − 25 = 7 years old.

Example 7.9.4

Louise is 26 years old. Her daughter Carmen is 4 years old. In how many years will Louise be double her daughter’s age?

In how many years will Louise be double her daughter’s age?

[latex]\begin{array}{rrrrrrr} 26&+&x&=&2(4&+&x) \\ 26&+&x&=&8&+&2x \\ -26&-&2x&&-26&-&2x \\ \hline &&-x&=&-18&& \\ &&x&=&18&& \end{array}[/latex]

In 18 years, Louise will be twice the age of her daughter.

For Questions 1 to 8, write the equation(s) that define the relationship.

Solve Questions 9 to 20.

Answer Key 7.9

Intermediate Algebra by Terrance Berg is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License , except where otherwise noted.

Share This Book

age math equation problem solving

Study.com

We're sorry, this computer has been flagged for suspicious activity.

If you are a member, we ask that you confirm your identity by entering in your email.

You will then be sent a link via email to verify your account.

If you are not a member or are having any other problems, please contact customer support.

Thank you for your cooperation

Algebra: Age Word Problems

Related Pages Word Problems Involving Age Solving Age Word Problems Using Algebra More Algebra Lessons

Age problems are algebra word problems that deal with the ages of people currently, in the past or in the future.

How To Solve Age Word Problems?

If the problem involves a single person, then it is similar to an Integer Problem. Read the problem carefully to determine the relationship between the numbers. This is shown in the examples involving a single person .

If the age problem involves the ages of two or more people then using a table would be a good idea. A table will help you to organize the information and to write the equations. This is shown in the examples involving more than one person .

How To Solve Age Problems Involving A Single Person?

Example: Five years ago, John’s age was half of the age he will be in 8 years. How old is he now?

Solution: Step 1: Let x be John’s age now. Look at the question and put the relevant expressions above it.

Step 2: Write out the equation.

Isolate variable x

Answer: John is now 18 years old.

How To Use Algebra To Solve Age Problems?

How To Solve Age Problems Involving More Than One Person?

Example: John is twice as old as his friend Peter. Peter is 5 years older than Alice. In 5 years, John will be three times as old as Alice. How old is Peter now?

Solution: Step 1 : Set up a table.

Step 2: Fill in the table with information given in the question. John is twice as old as his friend Peter. Peter is 5 years older than Alice. In 5 years, John will be three times as old as Alice. How old is Peter now?

Let x be Peter’s age now. Add 5 to get the ages in 5 yrs.

Write the new relationship in an equation using the ages in 5 yrs.

In 5 years, John will be three times as old as Alice.

2 x + 5 = 3 ( x – 5 + 5) 2 x + 5 = 3 x

Isolate variable x x = 5

Answer: Peter is now 5 years old.

Example: John’s father is 5 times older than John and John is twice as old as his sister Alice. In two years time, the sum of their ages will be 58. How old is John now?

Solution: Step 1: Set up a table.

Step 2: Fill in the table with information given in the question. John’s father is 5 times older than John and John is twice as old as his sister Alice. In two years time, the sum of their ages will be 58. How old is John now?

Let x be John’s age now. Add 2 to get the ages in 2 yrs.

Write the new relationship in an equation using the ages in 2 yrs.

In two years time, the sum of their ages will be 58.

Answer: John is now 8 years old.

How To Solve Word Problems With Multiple Ages?

Example: Ben is eight years older than Sarah. 10 years ago, Ben was twice as old as Sarah. Currently, how old is Ben and Sarah?

Algebra Word Problems With Multiple Ages Example: Mary is three times as old as her son. In 12 years, Mary’s age will be one year less than twice her son’s age. How old is each now?

Algebra Word Problem With Past And Present Ages Example: Arun is 4 times as old as Anusha is today. Sixty years ago, Arun was 6 times as old as Anusha. How old are they today?

Algebra Age Word Problem With Past, Present, And Future Ages How to organize the data using a table and solve using a system of linear equations?

Mathway Calculator Widget

We welcome your feedback, comments and questions about this site or page. Please submit your feedback or enquiries via our Feedback page.

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.

To log in and use all the features of Khan Academy, please enable JavaScript in your browser.

Unit 6: Lesson 6

Age word problem: Ben & William

Want to join the conversation?

Good Answer

Video transcript

IMAGES

  1. Using Equations to Solve Age Problems in Math

    age math equation problem solving

  2. Algebra Word Problems Worksheet With Solutions / Word Problems Solver Mta Production â

    age math equation problem solving

  3. Age Problems

    age math equation problem solving

  4. Algebra

    age math equation problem solving

  5. Math 7 Problem Solving

    age math equation problem solving

  6. Age Problem

    age math equation problem solving

VIDEO

  1. कुंभ राशि । मेहनत का फल मिलेगा । दिनांक 18 जनवरी बुधवार । कमलेश शर्मा ।

  2. System of linear equation & age problem

  3. A Nice Algebra Problem

  4. Algebra, age problem in tagalog

  5. A Nice Algebra Problem

  6. Check your intelligence by solving this easy maths question

COMMENTS

  1. Age Word Problems

    You may notice that Tanya's current age is defined using the age of Marcus. However, Marcus's present age is currently unknown. So let's express Marcus's age

  2. Age Problems

    First, circle what it is you must ultimately find— how old is Tom now? Therefore, let t be Tom's age now. Then three years ago, Tom's age would be t – 3. Four

  3. Equation Problems of Age: Concepts and Practice Questions

    If the age of a person is 'x', then 'n' years after today, the age = x + n. Similarly, n years in the past, the age of this would have been x – n years. Example

  4. 7.9 Age Word Problems

    One application of linear equations is what are termed age problems. When solving age problems, generally the age of two different people (or objects) both

  5. Using Equations to Solve Age Problems in Math

    Steps to Solve Age Word Problems · Express what we don't know as a variable · Create an equation based on the information provided · Solve for the

  6. Age Word Problems (video lessons, examples and solutions)

    How To Solve Word Problems With Multiple Ages? · Sally is 3 times as old as John. · Kim is 6 years more than twice Timothy's age. · Leah is 2 less than 3 times

  7. Solving Linear Equations

    Objective: Solve age problems by creating and solving a linear equa- tion. An application of linear equations is what are called age problems. When we are.

  8. Age Word Problems In Algebra

    This math tutorial video explains how to solve age word problems in Algebra given the past, present, and future ages of individuals relative

  9. Algebra AGE WORD PROBLEM

    TabletClass Math:https://tcmathacademy.com/ Math help with algebra word problem involving age. For more math help to include math lessons

  10. Age word problem: Ben & William (video)

    If you add up the digits of the number you are trying to divide by 3, and the sum of the digits is divisible by 3, the entire number is divisible by 3. With