T ( x , y ) is the number of circles in a trapezoidal arrangement such that x is the number of circles in the top row and y is the number of circles in the bottom row. Each row has one fewer circle than the row beneath it does.
What is the only number between 10000 and 20000 that cannot be a value of T ( x , y ) for positive integers x and y such that x < y ?
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.
Nice solution!
Michael: You show how all odds can be represented, and all numbers with one or more odd factors can be represented. You state that numbers with all even factors cannot be represented either way. Which part of your proof shows/indicates there is not a third way? Are you relying on the problem statement to know this?
Update: I missed that 16384 = 2^14, so never mind.
Log in to reply
It's the first sentence, "...since both factors cannot both be even". Give any x , y , both ( x − y + 1 ) and ( x + y ) cannot be even. if one is even, the other is odd. Powers of 2 can never be a trapezoidal number.
Edit: Okay, so you caught it. I've updated my solution to point out that 1 6 3 8 4 = 2 1 4
Michael: Is there a factor of 1/2 missing with (2a)(2b + 1)? When I sub back in the x and y values I need to drop the 1/2 in the expression for T(x,y) to get (2a)(2b + 1).
Log in to reply
Oh, that again, a "loose 2 1 ". Fixed. Try that again now.
Thanks for pointing this out.
What about prime numbers between 10000 and 20000, they cannot have any other factor than 1 and themselves so, the equation cannot be a prime number, can it ??
Log in to reply
Parvesh, T(x,y) can be prime: here's a simple example. Pick x of 8 and y of 9, which would be a trapezoid of two rows, or 8+9 =17 total circles. Using the formula above: 1/2(9+8)(9-8+1) =1/2(17)(2)= 17.
Now, this isn't a prime between 10000 and 20000, but ANY prime, P, can be formed by choosing: x = P/2 -1/2 and y = P/2 +1/2
T(x,y)= 1/2((P/2+1/2)+(P/2-1/2))((P/2+1/2)-(P/2-1/2)+1)
Which reduces to: T(x,y)= 1/2(P)(2)= P.
Now, even the prime 2 will work in the above formula, but the trapezoid formed will have only 1 row, with 2 circles.
Log in to reply
Thank you @Jeremy Fischman , that's what I wanted to know. And thank you @parvesh kumar for asking the question!
As far as i could understand it is consistent to the following formula 1/2 h(a+b) that is the same equation for the trapezoid, and as you can notice from the shown examples that the a=1/2 b ,so this derives us to the point that the equation should give us 1/2 h(a+2a), and the H is equal to the a+1 ,so with a little of simplicity to the equation it would become 3/2a(a+1), and as a result the formula that could be derived that the T would be equal to X+6, X+9, X+12, X+15,so it's increasing by 3 in the addition with no exceptions ,so why we have a determined value from 10000 to 20000, otherwise I didn't understand what he wants in the question.
Log in to reply
It was coincidence that all the pictures showed examples where a = 1/2b and h = a + 1, but these are not necessary conditions for T.
T(x,y) is actually the sum of the integers from x until y (incl.), the reason for this being each following row having one more circle than the previous one.
@ David Vreken - Your problem statement is redundant at the end. You do not need to state x< y, because that was already covered in the information above.
Log in to reply
Yes, that's true. Thanks! (Unfortunately, I cannot edit this problem any more.)
A slightly less formal way to see that any number k ∈ N with at least one odd factor (i.e. a number that's not a power of 2 ) can be written as a trapezoidal number: Let k = m ( 2 n + 1 ) , for m , n ∈ N . Then if we use m as the middle term in a series (strictly speaking, a summation), and then add in the n integers directly before and after m , the series will have a sum of m ( 2 n + 1 ) , because in a sequence consisting of an odd number of consecutive terms, the middle term is always the average.
For example, for k = 7 7 = 7 × 1 1 , we can start with 7 , and then add in the five integers directly before and after 8 :
7 7 = 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 1 0 + 1 1 + 1 2 = T ( 2 , 1 2 )
It is possible that there may be some negative integers in the series when first written; e.g. for k = 5 2 = 4 × 1 3 , we start with 4 , and then add in the six integers directly before and after 4 , which gives us
5 2 = - 2 + - 1 + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 1 0
but then we can easily just remove the negatives, their positive counterparts, and zero, which will leave the same sum with a proper trapezoidal representation:
5 2 = 3 + 4 + 5 + 6 + 7 + 8 + 9 + 1 0 = T ( 3 , 1 0 )
Note we can always do this 'removal', as there have to be fewer negatives than positives in the initial series, otherwise the initial k would also be negative.
I like this solution, too! Very creative!
T ( x , y ) = 2 y ( y + 1 ) − 2 x ( x − 1 ) = 2 y 2 + y − x 2 + x = 2 ( y + x ) ( y − x + 1 )
Setting y − x + 1 equal to 2 :
y − x + 1 = 2 y + x = n → 2 y − 1 = n
Initially it appear that n must be an odd number, but this is only because we set y − x + 1 equal to 2. If we instead set it equal to 3:
2 y − 2 = n
Therefore n must have at least one odd factor, and as such for n to not be a solution, it must be a power of 2. The only power of 2 within the range is 1 6 3 8 4 .
We haven't completely arrived at "Therefore n must have at least one odd factor". Do you see why?
Do you know how to complete the proof?
Log in to reply
No. Can you please explain?
Log in to reply
All he has shown is "If we set
y
−
x
+
1
=
2
or 3, then
n
must have at least one odd factor".
He has not shown what happens if
y
−
x
+
1
=
4
,
5
,
…
, where it
might
be possible that
n
does not need an odd factor.
So, it's a minor gap to close, which can be done in a similar manner as what he did above.
Whats the best calculator to use
We can obtain a expression for T ( x , y ) :
T ( x , y ) = x + ( x + 1 ) + ⋯ + y = ( 1 + 2 + . . . + y ) − [ 1 + 2 + . . . + ( x − 1 ) ] = 2 y ( y + 1 ) − 2 x ( x − 1 )
And let an integer n be its value. Then 2 n = y 2 + y − x 2 + x = ( y + x ) ( y − x ) + ( y + x ) = ( y + x ) ( y − x + 1 ) Now we split in two cases.
When x ≡ y ( m o d 2 ) , we have n = 2 y + x ( y − x + 1 ) . Because y > x , the term y − x + 1 must be an odd number larger than 1.
When x ≡ y ( m o d 2 ) , we have n = ( y + x ) 2 y − x + 1 . Because both x , y are positive integers, so y + x would also be an odd integer larger than 1.
As a result, we cannot have n to have the only factor 2 , so the only answer cannot obtain is 2 1 4 = 1 6 3 8 4 .
We can produce any odd number n with T ( 2 n − 1 , 2 n + 1 ) .
We can produce any multiple of any odd number, as the number of circles in an odd-height trapezium is equal to its height multiplied by length of the middle row.
This means we must find an even number with only even prime factors. As 2 is the only even prime, our solution must be the only power of 2 between 1 0 , 0 0 0 and 2 0 , 0 0 0 : 2 1 4 = 1 6 3 8 4 .
Quick visual for the second point:
Generalization
Let the prime factorization of N be N = 2 e 2 ⋅ 3 e 3 ⋅ 5 e 5 ⋯ p e p ⋯ . Then the number of ways in which N can be expressed in the desired form is X ( n ) : = # { ( x , y ) ∣ T ( x , y ) = N } = ( e 3 + 1 ) ⋅ ( e 5 + 1 ) ⋯ ( e p + 1 ) ⋯ − 1 . We see that X ( n ) = 0 iff e 3 = e 5 = ⋯ = 0 , i.e. the prime factorization of N no odd prime factors. Therefore N is at best a power of 2, which in this case requires N = 1 6 3 8 4 .
Proof of this expression:
We have N = T ( x , y ) = 2 1 y ( y + 1 ) − 2 1 x ( x − 1 ) = 2 1 ( y − x + 1 ) ( y + x ) = : 2 1 A B The factors A = y − x + 1 and B = y + x have opposite parity, i.e. one is odd and the other is even.
Thus we are looking for factorings of the form 2 N = A B , with A and B of opposite parity and A < B . We take out all factors 2, i.e. we write N = 2 e 2 ⋅ m m = 3 e 3 ⋅ 5 e 5 ⋯ p e p ⋯ is odd . Let m = u v be any factoring of m ; now set A = u and B = 2 e 2 + 1 v , and swap them if necessary to ensure that A < B . Let x = 2 1 ( B − A + 1 ) , y = 2 1 ( B + A − 1 ) . Then T ( x , y ) = N as required; and the number of pairs ( x , y ) is equal to the number of factors of m , that is, ( e 3 + 1 ) ⋅ ( e 5 + 1 ) ⋯ ( e p + 1 ) ⋯ .
However , for each value of N we must rule out the trivial factoring with u = 1 . This leads to A = 1 and B = 2 N , so that x = y = 2 N , violating the condition x < y . Therefore we subtract one and obtain the final count X ( n ) = ( e 3 + 1 ) ⋅ ( e 5 + 1 ) ⋯ ( e p + 1 ) ⋯ − 1 .
To illustrate, consider the case N = 9 0 , with e 2 = 1 and m = 4 5 = 3 2 ⋅ 5 1 ; there are ( 2 + 1 ) ( 1 + 1 ) = 6 ways to factor 4 5 = u v :
u 1 3 5 9 1 5 4 5 v 4 5 1 5 9 5 3 1 A 1 3 5 9 1 2 4 B 1 8 0 6 0 3 6 2 0 1 5 4 5 x 9 0 2 9 1 6 6 2 2 1 y 9 0 3 1 2 0 1 4 1 3 2 4 The first row of this table violates the condition x < y , so that we are left with X ( 9 0 ) = 6 − 1 = 5 .
Great generalization! Thanks for sharing.
With the help of some python code and a formula T ( a , b ) = 2 1 ( b + a ) ( b − a + 1 ) :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
Lovely! Great way to use code. Made me smile :)
Log in to reply
Thanks! ...though I should have probably figured it out by myself
It is the power of 2 between 10000 and 20000, which is 1 6 3 8 4 .
See Rectangular and Trapezoidal Arrangements , where I show that the number of trapezoidal arrangements of n items (including the degenerate case of all items on a line) equals the number of odd divisors of n . The powers of 2 are the only numbers with exactly one odd divisor, viz. 1.
Great article! Thanks for sharing!
I struggled with this question and finally solved it. I found that this is level 2 in number theory, but I want to ask the experts how hard is this question
In python i created a list of numbers from 10000 to 20000, then i started writing functions to remove numbers based on rules for each stack:
So we remove:
1 stack: not allowed
2 stacks: all numbers when added to 1 is divisible by 2
3 stacks: all numbers divisible by 3
4 stacks: all numbers when added to 2 is divisible by 4
5 stacks: all numbers divisible by 5
6 stacks: all numbers when added to 3 is divisible by 6
And you quickly realized the pattern for N stacks: If N is odd, all numbers divisible by N should be removed. If N is even, all numbers, when added to N/2, is divisible by N should be removed. So just write one single function with these two rules and run the list through it. And voila!
This method is a bit inductive but it does help here:
T(x,y)= =z(say)=x+(x+1)+(x+2)+…+[x+(y-x)]
=((y(y+1))/2)-((x(x-1))/2)
=(y+x)(y-x+1)/2
Now, y>x. So, let y=x+n.
z=(2x+n)(n+1)/2.
Let Z n represent the set of values of z corresponding to n.
Now, z k = ( k + 1 ) × ( ( 2 x + k ) / 2 )
Case 1: k is odd :
k+1 is even.
Then, k+1/2 may be odd or even.
But, 2 x + k is odd ( e v e n + o d d = odd).
So, z k = o d d × o d d
Or, z k = o d d × e v e n
Case 2: k is even :
2 x + k is even ( e v e n + e v e n =even) But k+1 is odd.
So, z k = o d d × e v e n
Reader may verify that Z 1 ={3,5,7,9,11,…} covers all odd numbers except 1.
Let's hunt for even numbers.
The even numbers are of the form o d d × e v e n , which rules out the presence of (integral) powers of 2 in any of the set Z k .
The only (integral) power of 2 between 10000 and 20000 is 16384.
Hence, the answer is 16384.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
1 |
|
Another way of interpreting the set of all possible values of T ( x , y ) is as the set of all possible sums of two or more consecutive positive integers. Now, any number with an odd factor is expressible as the sum of consecutive integers. For example, if n = 5 ∗ k , then n = ( k − 2 ) + ( k − 1 ) + k + ( k + 1 ) + ( k + 2 ) . The only number between 10000 and 20000 that doesn't have an odd factor is 2 1 4 = 1 6 3 8 4 .
Let us express T as a function of n and y where n is the number of slabs and y is the number of balls in the bottom row. So,
T(n,y) = y + (y-1) + (y-2) + ...... + (y-n+1)
T(n,y) = ny - (1 + 2 +3 + ..... + (n-1))
T(n,y) = ny -
2
n
(
n
−
1
)
Now, letting T(n,y) = k and rearranging the expression, we get
y =
n
k
+
2
(
n
−
1
)
.If n is odd, for y to be integer, k has to be a multiple of n
.So k can be of the form 3n , 5n , 7n .... (n cannot be 1)
.If n is even, for y to be integer, k has to be an odd multiple of
2
n
.So, k should be of the form
2n+1 , 4n+2 , 6n+3 , 8n+4 .......
.So, all odd numbers can be achieved as they are of the form 2n+1
.This leaves us with even numbers
.All even numbers are either of the form 4n or 4n+2
.4n+2 can be achieved
.So, we are left with 2 and multiples of 4
.2 because in 4n+2, n cannot be 0
.All multiple of 4 can be expressed as 8n or 8n+4
.8n+4 can be achieved
.So, we are left with 2,4 and multiples of 8
.This pattern tells us that a number of the form 2^x cannot be achieved if n is even
.This form cannot be achieved if n is odd
.So the question reduces to finding the number of the form 2^x that lies between 10000 and 20000
.The answer is 16384 (2^14)
Let us think about sorting all possible values of T ( x , y ) where x < y by the number of rows.
As x < y , we have 2 rows at least. In the situation of 2 rows, the minimum possible value is T ( 1 , 2 ) = 3 , and all other values can be represented as 3 + 2 k , where k is a non-negative integer.
Similarly, in the situation of n rows, the possible values are T ( 1 , n ) + n k , where k is a non-negative integer.
For T ( 1 , n ) = 2 n ( n + 1 ) , we can make a statement as follow. If n is even, then T ( 1 , n ) = 2 n ( n + 1 ) ≡ 2 n ( m o d n ) .
If n is odd and n = 1 , then T ( 1 , n ) = 2 n ( n + 1 ) ≡ 0 ( m o d n ) .
Now consider the situations where n = 2 , 4 , 8 , … , 2 m … . These situations tell us that the values in the form 2 k + 1 , 4 k + 2 , 8 k + 4 , 1 6 k + 8 , … , 2 m k + 2 m − 1 , … are all possible. And they can quickly cover almost every positive integer, except those of the form 2 m .
And between 10000 and 20000 there is only one single number is the power of 2. It is 16384.
On the other hand, if n is odd and n = 1 , there is no chance for n to become a factor of 16384.
And If n is an even number but not a power of 2, T ( 1 , n ) at least has an odd factor which is not 1. Therefore 16384 is not a possible value here.
In conclusion, 16384 is the ONLY number between 10000 and 20000, who can't be a value of T ( x , y ) , where (x<y).
Problem Loading...
Note Loading...
Set Loading...
T ( x , y ) = 2 1 ( y − x + 1 ) ( y + x )
which cannot be a power of 2 , since both factors cannot both be even. Now, since the problem asks to find the "only number" between 1 0 0 0 0 and 2 0 0 0 0 , the number has to be 1 6 3 8 4 = 2 1 4 . Proving that it is the only number is another matter.
All the odd numbers can be expressed as T ( x , x + 1 ) = 2 x + 1 .
Let all even numbers with at least one odd factor be expressed as ( 2 a ) ( 2 b + 1 ) . Then
y = 2 a + b
x = 2 a − b
or
y = b + 2 a
x = b − 2 a + 1
whichever is greater between 2 a , b .
The only numbers that cannot be expressed in this way are even numbers with no odd factors.