Teaser 3071

by Oliver Tailby

Published Sunday August 01 2021

Three-cornered problem

I have a set of equal-sized equilateral triangles, white on one face and black on the back. On the white side of each triangle I have written a number in each corner. Overall the numbers run from 1 to my age (which is less than thirty). If you picture any such triangle then it occurs exactly once in my set (for example, there is just one triangle containing the numbers 1, 1 and 2; but there are two triangles containing the numbers 1, 2 and 3).

The number of triangles that contain at least one even number is even.

The number of triangles that contain at least one odd number is odd.

The number of triangles that contain at least one multiple of four is a multiple of four.

How old am I?

16 Replies to “Teaser 3071”

  1. I understand this to mean : “….I have written a UNIQUE number …..,overall, from 1 to my age”? (ie less than 10 triangles). Also, “….one triangle WHOSE APEXES containing ONLY the DIGITS 1,1,2 RESPECTIVELY etc ?

  2. I don’t understand this teaser. Why is there just one triangle containing the numbers 1, 1 and 2, but there are two triangles containing the numbers 1, 2 and 3?

    1. HI Chris,

      Welcome to our site!

      With labels 1, 2 and 3 clockwise around the triangle (which we can’t turn over) the labels can be (1, 2, 3) and (1, 3, 2).

      With labels 1, 1 and 2, changing the clockwise order of the labels, (1, 1, 2) and (1, 2, 1), does not give two different triangles because one is a rotation of the other.

  3. There are formulae for a combination of any r (in this case 3) from n digits (the age <30) where they can repeat, like 112, call that C(R), and where they can’t, like 123, call that C(noR).
    We need T = C(noR) + 2C(R) because for every 123 there is a mirror image.
    This collapses to a simple formula by which we can evalute T for each n.
    The next part is modifying those equations to show how may triangles have at least one 1,3,5 and 2,4,6 etc.

  4. I had some trouble understanding the question this time. If it had said the numbers of triangles included all possible using numbers up to the age I probably would have been alright. I wondered was it trying to say only use triangles with repeated numbers, or use also those with 3 different numbers but by mentioning ‘once’ don’t count both arrangements, or just use all triangles, in which case why the complicated way of saying it.

    Anyway as I was going to have to count the triangles with duplicate numbers as a part of anything I may as well start there. I got 3 answers with just that (though I now know I am not yet getting the maths right).
    So I then added in just one arrangement of each of the three number triangles and got no valid answer. Then I expanded to all triangles and got a unique answer.

    This is the point at which I come on site to check – but at the moment I have it wrong… Because I looked at the answer I do at least know the question is simply asking for all triangles. I also know my numbers for at least one even and at least one odd are fine, so my use of the various binomial coefficients can’t be too far wrong. It’s my calculation for triangles with multiple of 4 that is wrong. So I’ve either messed up my formula or made an arithmetical error.

    I’ll go away and retry…

    1. I discovered it was just one small arithmetical error and my formulae are fine, but the numbers accumulate so one small mistake affects quite a lot. I now obtain the answer given.

      I’ve tried to find a succinct way to describe what I have done but can’t. It has taken me a lot of sheets of paper seeing how things go as the age increases. I split the problem up into cards with all numbers the same, cards with just 2 the same and cards with all three different. I calculate cards added for each year added in age and work out which have all odds and all evens so I can work out at least one even or odd by subtraction. Binomial coefficients come into it. Eg for 3 different numbers adding age n adds 2 x binomial coeff /(n-1/)C2 cards. For 2 different numbers it’s 2/(n-1/) and for all numbers the same it’s 1. Then numbers need to be summed 1to n for each age. Then I end up with various tables with the different criteria to test. It gives me the right answer but I’m sure someone else can do a quicker and simpler solution than the one I have.

  5. The age n is an odd number due to my first checks of the even/odd conditions.

    I suspected that the number of cards with at least one even number and those with at least one odd number can be expressed as E(n) = aen^3 + ben^2 + cen + de and O(n) = aon^3 + bon^2 + con + do.

    So I established tediously all possible number trios for n = 3, 5, 7 and 9 (though unrealistic) to derive the 8 coefficients from 2 x 4 equations. The result using the age n given in Brian’s hidden solution agrees with his values of E and O. This seems to confirm that my equations are applicable.

    I did not yet explore the implication of the multiple of four condition, so I am still unable to identify the age on my own.
    More work to be done.

    1. PS2:
      The numbers of cards with at least one odd / even number are, for age = n,

      O(n) = [ 7 x n^3 +3 x n^2 + 5 x n + 9 x 1] / 24
      E(n) = [ 7 x n^3 – 3 x n^2 + 5 x n – 9 x 1] / 24

      The total number of cards is N = [(n+2) sub 3] + [(n) sub 3]
      The second term is due to cards with three different numbers.

  6. As Peter noted, the age n must be odd. One can deduce this immediately. If n were even, there would be the same number of odd and even numbers, and the first two counts would be the same.
    I then worked out an expression for the count of even numbers. Initially I missed a couple of terms and reached multiple solutions, which is usually an indicator of a mistake. That placed a further limitation on the solution space. At that point it was not actually necessary to work out the expression for the count of numbers divisible by 4. There could only be one unique solution, which I confirmed by evaluating the expression. It is not necessary to evaluate any of the exact counts. We are only interested in them modulo 2 or modulo 4.

    PS. I have posted a short but complete solution to last week’s teaser.

  7. Nice teaser. I concluded early on that not only was n ODD but came from set 5, 9, 13, 17 etc. Some formulae helped but I resorted to a recursive manual technique to establish numbers of cases with Odd, Even and 4X prescriptions within triangles with threes different numbers. Patterns emerging speeded this up. Although not of benefit it is amusing to note that total number of triangles in a set is given by T = n ( n^2 + 2)/3

    1. As above, n ODD can be easily determined. I then looked at the different ways to get even numbers and derived a total. That allowed me to conclude as you did that n = 4y + 1 where y = 1 to 7. The only unique value of y mod 4 is 4. Any way, I used a similar method to that for the even numbers to get the number of ways to get numbers divisible by 4. This gave the answer.

  8. Although I commented above that the expression T=n(n^2+2)/3 [giving the total number of triangles in a set using numbers 1 to n] is not useful I have looked again and in fact it is central to finding analytic expressions for numbers of triangles satisfying the constraints which I refer to as E, O and F (for even, odd and multiple of 4 cases).
    Expressing the relevant n values as n= 4m+1 where m=1,2,3 etc we can define F=(n-m), E=(n+1)/2 and O=(n-1)/2.
    Now the numbers of prescribed triangles in each category are T – F(F^2+2)/3, T – E(E^2+2)/3 and T – O(O^2+2)/3. For example, with n=17 this gives 908, 1400 and 1473 resp. Dividing the F category number by 4 gives cyclic remainders 1,2,1,0 for m=1,2,3,4 etc. The next valid solution after n=17 requires n=33 and hence the extra constraint in the teaser wording.
    I reached the analytic expressions by, for example, NOT counting triangles with 4, 8, 12, 16 etc but rather counting triangles that did not contain multiples of 4 in each of the triangle types (ie triangles containing a given number once, twice or thrice) and then finding the relevant complements.

  9. Here is a complete solution.
    If the age were even, then the first two counts would be the same. And so the age, n = 2x+ 1.

    Number of ways to include an even number for n = 2x + 1
    3 evens, all the same – x
    3 evens, two different – x.1.(x – 1)
    3 evens, all different – x(x – 1) (x – 2)/3
    2 evens, the same – x.1.(x + 1)
    2 evens, different – x(x – 1)(x + 1)
    1 even, odds the same – x(x + 1).1
    1 even, odds different – x(x + 1)x
    Total = x^2 + x(x – 1)(x – 2)/3 + x(x + 1)(2x + 1) = 0 mod 2
    Multiplying by 3 and removing terms which must be even, which gives 3x^2 = 0 mod 2
    And so x = 0 mod 2, and n = 4y + 1

    Number of ways to include a number (= 0 mod 4) for n = 4y + 1
    3 (= 0 mod 4), all the same – y
    3 (= 0 mod 4), two different – y.1.(y – 1)
    3 (= 0 mod 4), all different – y(y – 1) (y – 2)/3
    2 (= 0 mod 4), the same – y.1.(3y + 1)
    2 (= 0 mod 4), different – y(y – 1)(3y + 1)
    1 (= 0 mod 4), others the same – y(3y + 1).1
    1 (= 0 mod 4), others different – y(3y + 1).3y
    Total = y^2 + y(y – 1)(y – 2)/3 + y(3y + 1)(4y + 1) = 0 mod 4
    = y^2 + y(y – 1)(y – 2)/3 + y(1 – y).1 mod 4
    = y(y – 1)(y – 2)/3 + y mod 4
    Multiplying by 3 gives y(y – 1)(y – 2) + 3y = 0 mod 4
    By inspection, y = 0 mod 4, and n = 1 mod 16

    My age is 17 years.

Leave a comment

Design a site like this with WordPress.com
Get started