My Five Nieces

The sum of the ages of my five nieces is 47. Their ages are positive integers, and any two of them have a common divisor greater than 1.

How old is the eldest?


The answer is 15.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

9 solutions

Binky Mh
Nov 18, 2018

As 47 47 is prime, there cannot be a shared factor across the ages of all nieces, otherwise their sum would be a multiple of that factor. This rules out having 2 2 or fewer age groups.

We are also limited to ages with multiple prime factors - if one age group had a single prime factor, the remaining ages must share that prime in order to have a common divisor. This means the youngest our nieces can be is 6 6 , and no older than 23 23 (as 47 4 × 6 = 23 47-4\times6=23 ). We also need at least one niece to be 6 6 , as the average age must be 47 5 = 9.4 \frac{47}{5}=9.4 .

Because of this, we are limited to having 3 3 different age groups - having 4 4 or more age groups would require each age to have 3 3 shared prime factors, ruling out 6 6 as an option:

And finally, we need at least one odd number, otherwise their sum could not be 47 47 . This means either 15 15 or 21 21 .

This leaves us with two possible sets of primes:

2 2 , 3 3 & 5 5

2 2 , 3 3 & 7 7

We can rule out higher primes, since 7 × 5 > 23 7\times5>23 , as are all pairs of higher primes. In the latter case, one of the remaining ages would have to be 14 14 , but this would leave 12 12 to be split between the remaining three nieces, and so can not be the case.

And so we're left with the former, with the oldest being 15 \boxed{15} , and the remaining nieces being 10 10 , 10 10 , 6 6 & 6 6 .

Nice solution

A Former Brilliant Member - 2 years, 6 months ago

Nice solution indeed. I had very similar ideas but couldn't quite figure it out, because I thought all 5 nieces had to have different ages. Maybe one could add a statement in the problem, that the ages are not neccessarily distinct.

Marcellus Wallace - 2 years, 6 months ago

Log in to reply

As long as nothing is said, it can be anything. You never can presume that something has to be, it's always open until it's defined.

Cher H - 2 years, 6 months ago

I got a solution as 32,8,4,2,1. I just can't figure out why they say it is wrong. Could you help me..

Dhananjai Singh - 2 years, 6 months ago

Log in to reply

Greatest common divisor of any two numbers has to be greater than one. GCD(32, 1)=1

Wojciech Kłopotek - 2 years, 6 months ago

I wrote a solution so that children just starting using prime factors (say 10 or 11 year olds) could attempt the question. There must be either 1, 3 or 5 odd numbers to give a total of 47. Most likely 1 because that leaves four numbers to be multiples of 2. The prime factors will be 2, 3, 5 or 7, so I listed the multiple of those. 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 3, 6, 9, 12, 15, 18, 21 5, 10, 15, 20 7, 14, 21 The odd number must be either 3 x 5 = 15, or 3 x 7 = 21 (a factor of 7 is too big to work - I realise I haven't explained this) That leaves the biggest number as 15. If the other numbers are even they must be either 2 x 3 or 2 x 5 So we have 6, 6, 10, 10, 15

Vivian James - 2 years, 4 months ago
Jason Carrier
Nov 10, 2018

Any pair of them must share a divisor, but this divisor cannot be the same for all of them. If it were, then all five ages would have a common factor, implying their sum also shared this factor. 47 is prime, so this is clearly not the case. Since a given niece cannot share the same factor with all the others, each must have two distinct factors. Furthermore, these cannot be the same two for all of them, so a third factor must be present in the mix. These numbers are relatively small (average of 9.4), so we can pretty safely assume these common factors are 2, 3, and 5. Using just 6, 10, and 15, we get Bernardo’s solution; the oldest is 15.

Vinod Kumar
Nov 19, 2018

6,6,10,10,15 are the ages of five sisters.

Answer=15

I would like to point out that if we allowed nieces to have age 0, then the solution 0, 6, 6, 14, 21 would also be valid as gcd(0, a) = a for positive a.

I agree (since a maximum of one niece can indeed be age 0 as currently stated) so answer could also be given by: 0, 10, 10, 12, 15 or 0, 6, 6, 15, 20

Chris Cooper - 2 years, 6 months ago

Log in to reply

Thanks. I've updated the problem statement to reflect this.

In the future, if you have concerns about a problem's wording/clarity/etc., you can report the problem. See how here .

Brilliant Mathematics Staff - 2 years, 6 months ago

But 0 is not a positive integer, so this is a solution to another question.

Ilan Amity - 2 years, 4 months ago

Log in to reply

The text has been edited since then; the original asked for integer ages.

Joonas Jürgen Kisel - 2 years, 4 months ago

“Positive integer” was added to the question (2 months ago): these comments were added before the question was amended.

Chris Cooper - 2 years, 4 months ago

The ages of my five nieces are 6, 6, 10, 10, and 15.

The answer is 19. The ages of the nieces are 3, 5, 7, 13 and 19.

Winston Choo - 2 years, 7 months ago

Log in to reply

That's what I was thinking too until I read the problem more carefully. It says that the ages of any two have a common divisor greater than 1.

Joshua Lowrance - 2 years, 7 months ago

Log in to reply

Oh goodness my eyes must be tired xD

Winston Choo - 2 years, 7 months ago

How did you arrive at this? Is this solution unique?

Pi Han Goh - 2 years, 7 months ago

Log in to reply

Check:https://www.youtube.com/watch?v=6Giujua_s80

Bernardo Recamán - 2 years, 7 months ago
Patrick Copeland
Nov 22, 2018

I brute-forced this using Ruby (2.3.3).

Positive integers are 1 \geq1 . To add five of them up to 47, they must also be 43 \leq43 . This gives a total candidate pool of 4 3 5 43^5 = 147,008,443 sets of ages.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# This part took about two minutes to run on my machine
candidates = []
(1..43).each do |a|
  (1..43).each do |b|
    (1..43).each do |c|
      (1..43).each do |d|
        (1..43).each do |e|
          candidate = [a, b, c, d, e]
          candidates << candidate if candidate.inject(:+) == 47
        end
      end
    end
  end
end; candidates.count
# => 163185

# Remove re-orderings
candidates.each(&:sort!); candidates.uniq!; candidates.count
# => 2062

# Define how to get a list of factors out of an Integer
class Integer
  def factors
    tmp = abs
    output = []
    output << -1 if self < 0
    candidate = 2
    loop do
      quotient = remainder = nil
      loop do
        quotient, remainder = tmp.divmod(candidate)
        break unless remainder == 0
        output << candidate
        tmp = quotient
      end

      if candidate > quotient
        output << tmp if tmp > 1
        break
      else
        candidate += 1
      end
    end
    output
  end
end

candidates.select do |candidate|
  pairs = candidate.combination(2)
  pairs.all? do |pair|
    pair.map(&:factors).inject(:&).any?
  end
end
# => [[6, 6, 10, 10, 15]]

147,008,443 is a lot of things to brute force though. Viewed this way, this solution does not scale very well. Do you think the other solutions posted by the other members scale well, though?

Agnishom Chattopadhyay - 2 years, 6 months ago

Good Job, Binky Mh!

A brute force solution (102 million plus combinations checked), I realized that the neices had to be at least 2, allowing the oldest to be 39 (47-8). I generated all the combinations and checked for the conditions being met. As order did not matter, I sorted each solution into ascending age order and selected only unique, sorted solutions. There was only one solution as noted by the others: 6, 6, 10, 10 and 15.

The program and answer: Union [ Flatten [ Table [ If [ a + b + c + d + e = 47 g c d ( a , b ) > 1 gcd ( a , c ) > 1 gcd ( a , d ) > 1 gcd ( a , e ) > 1 gcd ( b , c ) > 1 gcd ( b , d ) > 1 gcd ( b , e ) > 1 gcd ( c , d ) > 1 gcd ( c , e ) > 1 gcd ( d , e ) > 1 , Sort [ { a , b , c , d , e } ] , Nothing ] , { a , 2 , 39 } , { b , 2 , 39 } , { c , 2 , 39 } , { d , 2 , 39 } , { e , 2 , 39 } ] , 4 ] ] ( ( 6 6 10 10 15 ) ) \text{Union}[\text{Flatten}[\text{Table}[\text{If}[a+b+c+d+e=47\land \\ gcd (a,b)>1\land \gcd (a,c)>1\land \gcd (a,d)>1\land \gcd (a,e)>1\land \gcd (b,c)>1\land \gcd (b,d)>1\land \gcd (b,e)>1\land \\ \gcd (c,d)>1\land \gcd (c,e)>1\land \gcd (d,e)>1, \\ \text{Sort}[\{a,b,c,d,e\}],\text{Nothing}],\{a,2,39\},\{b,2,39\},\{c,2,39\},\{d,2,39\},\{e,2,39\}],4]] \\ \\ \left(\left( \begin{array}{ccccc} 6 & 6 & 10 & 10 & 15 \\ \end{array} \right)\right)

Affan Morshed
Nov 23, 2018

6,6,10,10,15 works and 15 is the greatest out of that. Here is how I found it out: I first took the prime factorization of 47 (47 is prime), so you can now deduce that all 5 ages do not share a common factor greater than one. The solutions must have at least 2 prime factors, and the lowest of these is 6 while the second lowest of these is 10. The average must be 9.4, and since the 10>9.4, so no possible value except for 6 that is less than or equal to 9.4, so 6 must be a value in order for the average to work. If you use this technique (of seeing what possible ages are below or equal to the average) again, except this time with 47-6=41 as the sum and 5-1=4 nieces, you will gain too possible possibilities which are not necessarily mutually exclusive (in this case, they are not), you can just check these two cases by repeating the technique (of checking how many cases are below or equal to the average after excluding the ones defined by the previous split of possibilities) until either you find a contradiction or arrive at a conclusion. You will find that 2 cases do not arrive at a contradiction, and that these two cases give the same solution, so 6,6,10,15 must be correct (it will be the solution that you get). I technically didn't use this method, but rather brute forced it (and that to, not even proving 6,6,10,15 is the only solution (so I technically do not know (besides from what I have been told) that 6,6,10,15 is the only solution)), and while this does use brute force to some extent, it also uses deduction to reduce the range of possibilities that you must assess.

Soumik Singh
Nov 22, 2018

Lets assume that age of 5 younger nieces are in prime numbers. So we can say that the ages are 2,3,5,7 and 11. Remaining two nieces share a common divisor or we can say they are composite number. Therefore, 47 - (11+7+5+3+2) =19. We need to divide it in such a way that both the numbers are composite, i.e. 15 and 4. Hence, we can say that the age of eldest niece is 15 years.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...