Associated Topics || Dr. Math Home || Search Dr. Math

### Using Prime Factors to Limit Search

```Date: 07/26/2002 at 20:50:11
From: Holly Rietkerk
Subject: Logic

My husband and I are taking a math course and this is one of the
questions we have to solve:

A teacher asked a student the following question:

Our courtyard has more than one tree, and each tree contains
more than one bird.  Each tree has the same number of birds in
it, and there are between 200 and 300 birds in the courtyard.
How many trees are in the courtyard?

The student was stumped.  However, when the teacher told her
how many birds were in the courtyard she quickly solved the
problem.

How many trees are in the courtyard?"

So far I have figured that if t=tree and b=birds then b>=t+1. And I
figure that t>=2 because of the number of birds.

I also feel that the number of trees can only have 4 factors, but I
don't know if I am making a correct assumption.

I have asked my teacher if there is an actual answer or if we are
just looking for a generalization; she simply says to look for both.

Help!
```

```
Date: 07/26/2002 at 23:19:27
From: Doctor Peterson
Subject: Re: Logic

Hi, Holly.

Let's start by being a little more precise about what your variables
mean, even though this probably won't involve much algebra. I like to
define variables in detail, with sentences rather than words:

t = number of trees in courtyard
b = number of birds per tree

I used "per tree" because we are told that there are the same number
in each tree.

We know that

t > 1  and  b > 1

and that

200 <= tb <= 300

since the total number of birds will be the product of the number of
trees and the number of birds per tree. ("Between" is a little
ambiguous; we might want to use "<" rather than "<=".)

At this point we have just written down what the problem says, with
no assumptions or deductions. Now we can start actually thinking.

There are problems like this where someone can't answer with the
information he first has, and that tells you something about that
information; but here it doesn't sound as if the student knows
anything we don't know (such as seeing and estimating the number of
trees on her own), so we probably can't use that approach. But the
fact that she can tell the answer when she knows the number of birds
does, as you suggest, tell us something about the number of factors.
Let's think about what that is.

Often we can get a better feel for something like this by trying it
out - playing with the problem to get familiar with it before we get
down to work. So suppose we were told that there were, say, 250 birds.
Then t and b might be any of

t    b
---  ---
1  250  -- not allowed, since t>1
2  125
5   50
10   25

and so on. So the student couldn't determine the number of trees from
this. What went wrong? There are too many ways to factor 250. We'd
like one where there is only one product of numbers other than 1 that
will work. That means those two factors have to be prime. So the
number of birds must be the product of two primes.

But wait a minute: if we took, say, 55 as the number of birds, there
could be either 5 trees of 11 birds or 11 trees of 5 birds. Nothing
tells us which of these pairs to use. So even that isn't good enough.

But ...

I'll let you finish the problem. Let me know what you find if you
need more help!

- Doctor Peterson, The Math Forum
http://mathforum.org/dr.math/
```

```
Date: 07/29/2002 at 07:41:54
From: Holly Rietkerk
Subject: Thank you (Logic)

Dr. Peterson,

Thanks for the tip.  I figured out that yes, prime numbers were the
way to go, and then as I was figuring all of those combinations out,
it hit me, not only does it have to be prime, but also a square.  So,
I knew it had to be between 2 and 150 (because of the potential number
of trees) and I new that the choices were very limited, so 17 was the

Holly Rietkerk
```

```
Date: 07/29/2002 at 08:36:13
From: Doctor Peterson
Subject: Re: Thank you (Logic)

Hi, Holly.

Good work! That's just where I was leading. If those two prime
factors were the same, there would be no question which is birds and
which is trees. So take the square roots of 200 and 300, and find an
integer in between.

This problem can be found in the Math Forum's Library of Problems of

http://mathforum.org/elempow/solutions/solution.ehtml?puzzle=58

- Doctors Peterson and Sarah, The Math Forum
http://mathforum.org/dr.math/
```
Associated Topics:
High School Puzzles
Middle School Puzzles

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search