The image shows a triangular formation of circles, where the top row has numbers 1 through 8. The circles in subsequent rows each have the product of the two numbers above it. For example, below the 2 and 3 is 2 × 3 = 6 .
How many trailing zeros will the number at the bottom have?
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.
Can you say that you look at the row, where the first trailling zero appears and then do the same operation as how it is formed? As long as you reach the end point at the bottom? (Otherwise I could also imagine that somewhere down the road a 0 is appearing from some previously neglected path...?)
The only way in the rhythm to get a zero, is by multiplying 4 times 5 and 5 times 6.
Can you also do written multplication and move on a step if a number other than zero appears on the left of the end result of your written multiplication?
Log in to reply
A zero appears when you have a multiple of 10. 10 is only formed with its factors 2 and 5. Since 2 can appear from 2,4,6, and 8 you will most certainly have more 2's than 5's so OP only tracks 5's. Your question " a 0 is appearing from some previously neglected path" is not going to happen because you would have to neglect a 5.
If the seed row had two more entries, 9 and 10, then that 10 would contribute a factor of 5 as well, for example. Maybe that is what you are asking. Then you would track those down as well.
That is a neat and nice technique...
Very nice presentation.
For completeness, you should also track the number of powers of 2, though it is almost obvious that there will be more powers of 2 than powers of 5.
Log in to reply
I don't that you need to check the powers of 2, as the second row has no numbers that end in 5. If there were numbers like this, then extra trailing 0s would be added.
Log in to reply
Good observation for this scenario - we only need to account for the trailing 0's from the second line onwards.
Though, if we extended this to (say) 126 rows, then we will have to be careful with accounting. (Though, maybe the third row onwards will be all 0's)
Brilliant!
Just the way I thought of 😁😁
1 2 3 4 5 6 7 8
2 6 12 20 30 42 56
12 72 240 600 1260 2352
864 17280 144000 756000 2963520
14929920 2488320000 1.08864E+11 2.24042E+12
3.71504E+16 2.70888E+20 2.43901E+23
1.00636E+37 6.607E+43
6.64904E+80
Using a spreadsheet to work down the calculations this is what I get. So I don't understand where you get 35. Maybe like a lot of the questions in this forum it is not clear what the question is!
Log in to reply
I think the question is clearly stated. Perhaps you are confusing the concepts of "How many digits does a number have" and "How many digits are there at the end of a number". For example, 1 0 ! = 3 6 2 8 8 0 0 = 3 . 6 2 8 8 0 0 E + 6 has 7 digits and 2 of them are trailing zeroes.
The spreadsheet multiplication tells us that the last number has exactly 81 digits.
I see that the 7th digit from the left is not 0, so there are at most
8
1
−
7
=
7
4
trailing zeros.
How many trailing zeros do you think there are?
before reading what you said i was like 𝟒 𝐭𝐢𝐦𝐞𝐬 𝟓 𝐢𝐬 𝐧𝐨𝐭 𝟏
I worked it in the same way! I love the visual solutions!
exactly how i solved it
Isn´t this Pascals triangle, but cut out?
The number of trailing zeroes is the number of factors 1 0 = 2 ⋅ 5 present; since there are many more even numbers than factors 5 in the problem, the number of trailing zeroes is equal to the number of factors 5 .
Since each factor 5 must eventually come from the "5" at top, we must consider how many pathways there are from the "5" to the bottom circle .
Each of these pathways consists of 4 steps "southwest" and 3 steps "southeast". Therefore the number of pathways, and thus the number of trailing zeroes, is ( 3 7 ) = 3 ⋅ 2 ⋅ 1 7 ⋅ 6 ⋅ 5 = 7 ⋅ 5 = 3 5 .
The quickest solution
Brilliant!
didn't understand the 7 and the 3
Log in to reply
There are 7! Possibilities (paths) from the 5 to the bottom as your numerator but you then have to divide out all the possibilities going "southeast" and "southwest" of which there are 4! And 3!. Thus you have 7!/4!3! = 7x6x5/3x2x1 = 7x5 = 35.
I can't understand your solution.can anyone help?
I understand the 7, that's the number of steps it takes to get from to the bottom, starting with 30, 3 to the right, then starting with 20, 4 to the left. 4 to the left, then 3 to the right. I also understand the concept of trailing zeros as factors of 10. That said, I too am unclear we're the 3 is coming from and how your solving (7 3) to (7•6•5)/(3•2•1). Admittedly, I'm a little rusty which is why I started using this app! Thanks in advance for a little more explanation for those of us dusting off the rust. ;-)
Log in to reply
It takes seven steps to get from the top "5" to the bottom circle. Three of the seven steps are "southeast". The question is thus: in how many different ways can we choose three out of seven steps? That is, how many combinations are there of 3 out of 7?
For the answer, consider that
we have 7 possibilities to choose the first "southeast",
6 possibilities left to choose the second,
5 possibilities to choose the third,
resulting in 7 ⋅ 6 ⋅ 5 choices. However, we now have every solution six ( 3 ⋅ 2 ⋅ 1 ) times, because it does not matter which "southeast" we choose first, second, or third. Therefore we divide: 3 ⋅ 2 ⋅ 1 7 ⋅ 6 ⋅ 5 = 3 ! 4 ! 7 ! = : ( 3 7 ) .
Great solution!
Great solution. But it isn't just that there are more 2 even numbers than multiples of 5; all then number from the second row on are even. So the 5 in the top row is the only odd multiple of 5.
Log in to reply
Let me reword that. (Can't seem to edit my own comment once it's posted.) It isn't just that there are more even numbers than factors 5; each factor 5, except the one in the top row, has a factor 2 to pair with it.
Inspiring solution, as always!
Elegant solution.
The second row will be ( 1 1 2 1 , 2 1 3 1 , 3 1 4 1 , 4 1 5 1 , 5 1 6 1 , 6 1 7 1 , 7 1 8 1 ) , the third row will be ( 1 1 2 2 3 1 , 2 1 3 2 4 1 , 3 1 4 2 5 1 , 4 1 5 2 6 1 , 5 1 6 2 7 1 , 6 1 7 2 8 1 ) , the fourth row will be ( 1 1 2 3 3 3 4 1 , 2 1 3 3 4 3 5 1 , 3 1 4 3 5 3 6 1 , 4 1 5 3 6 3 7 1 , 5 1 6 3 7 3 8 1 ) , and so on. We can observe that the pattern of exponents for each digit follows the numbers of Pascal's Triangle , since the exponents for each digit is the sum of the exponents of the digits in the line before. Therefore, the final number will be 1 1 2 7 3 2 1 4 3 5 5 3 5 6 2 1 7 7 8 1 , and since 5 3 5 is the greatest factor that is a multiple of 5 , and 2 3 5 is also a factor (from 4 3 5 ), 1 0 3 5 is the greatest factor that is a multiple of 1 0 , so the final number ends in 3 5 zeros.
Nice answers, but all wrong. If you multiply it all out, here's the result, in csv form:
1,2,3,4,5,6,7,8 2,6,12,20,30,42,56 12,72,240,600,1260,2352 864,17280,144000,756000,2963520 14929920,2488320000,108864000000,2240421120000 37150418534400000,270888468480000000000,243901204807680000000000 10063619980174600000000000000000000000,66070023830779200000000000000000000000000000 664903611914043000000000000000000000000000000000000000000000000000000000000000000 which has 66 trailing zeroes
Log in to reply
Whatever you are using to calculate these numbers is rounding your last three large numbers: 10063619980174600000000000000000000000 should be 10063619980174622195712000000000000000, 66070023830779200000000000000000000000000000 should be 66070023830779248141926400000000000000000000, and 664903611914043000000000000000000000000000000000000000000000000000000000000000000 should be 664903611914043473202543232567979684173499596800000000000000000000000000000000000.
Log in to reply
I hate to say that I did it out using "brute force", but when you have a computer, that is an option. I am getting what Hans is getting. I am working on a more elegant way of determining the outcome.
Log in to reply
@Nicholas Chocas – I first did it the above way (looking at the pattern of exponents). But then after reading Hans's comment I double-checked it on a computer using Python.
# Triangles and Numbers
# Python 2.7.3
t = []
t.append([1, 2, 3, 4, 5, 6, 7, 8])
print t[0]
for a in range(1, len(t[0])):
t.append([])
for b in range(0, len(t[a - 1]) - 1):
t[a].append(t[a - 1][b] * t[a - 1][b + 1])
print t[a]
Your calculation is not accurate, since it was rounded, here is mine with java: 2 6 12 72 864 17280 14929920 2488320000 37150418534400000 270888468480000000000 10063619980174622195712000000000000000 66070023830779248141926400000000000000000000 664903611914043473202543232567979684173499596800000000000000000000000000000000000 (35 zeros)
1 2 3 4 5 6 7 8 9 10 11 |
|
1 2 3 4 5 6 7 8 9 |
|
To find the value of the bottom circle, first, I tried to simplify the problem. With one number, a , the value of the bottom circle a ; With two numbers, a and b , its value is a b ; With three numbers, its value is a b 2 c ; With four number, a b 3 c 3 d ;... We can realize that the power of each number in each pattern, from left to right, corresponds to the numbers in Pascal's triangle. Hence, we can calculate the value of the bottom circle in the picture: it equals to 1 1 × 2 7 × 3 2 1 × 4 3 5 × 5 3 5 × 6 2 1 × 7 7 × 8 1 . However, we are only caring about the number of trailing zeros, so we can remove the prime factors that are neither 2 nor 5. We get 2 1 0 1 × 5 3 5 . Since 1 0 1 > 3 5 , there are 35 trailing zeros in the number at the bottom.
see below for the trailing 0 for each number of each row
Such an elegant solution
Not a solution, but a question...how do we not know whether or not other products, or child products, when multiplied together, will also give a number with a trailing zero? I've looked at the times tables to see that indeed, only numbers which are multiples of 5 or 10 result in numbers with trailing zeroes, but I would deem this a little too naive. Or am I looking at this the wrong way?
Well, any number with a trailing zero can have a 10 factored out of it, right? Which means that the only numbers with trailing zeroes are numbers that are a multiple of 10. And since 10, when factored out, is 2x5, the only numbers with trailing zeroes are numbers that are multiples of both 2 and 5. So that’s how we know other “child products”, which do not involve both 2 and 5, will not have any trailing zeroes. Does that make sense?
The amount of trailing zeroes is equal to the least between the amount of factors of 5 and 2.
there are many more factors of 2 than 5 (4 has two factors of 2 and its placed symmetrically in the triangle compared to 5
Then its only a matter of realising the amount of factors of 5 in each number form a pascal's triangle. Since you multiple two adjacent numbers, you multiply the factors, which means the amount of factors increase additively.
Going doing the triangle shows the final spot coincides with 35, thus that is our answer.
1 2 3 4 5 6 7 8 9 10 11 |
|
A Python scripting approach:
lines = [[x for x in range(1, 9)]]
while len(lines[-1]) > 1:
lastline = lines[-1]
newline = []
for i in range(len(lastline) - 1):
newline.append(lastline[i] * lastline[i + 1])
lines.append(newline)
for line in lines:
print(line)
lastvalue = str(lines[-1][0])
zeroes = 0
while lastvalue[-1] == '0':
zeroes += 1
lastvalue = lastvalue[:-1]
print('Zeroes:', zeroes)
This will output:
[1, 2, 3, 4, 5, 6, 7, 8]
[2, 6, 12, 20, 30, 42, 56]
[12, 72, 240, 600, 1260, 2352]
[864, 17280, 144000, 756000, 2963520]
[14929920, 2488320000, 108864000000, 2240421120000]
[37150418534400000, 270888468480000000000, 243901204807680000000000]
[10063619980174622195712000000000000000, 66070023830779248141926400000000000000000000]
[664903611914043473202543232567979684173499596800000000000000000000000000000000000]
Zeroes: 35
See https://github.com/alcibiade/brilliant/blob/master/2018-02-26/l2-problem3.py
If you multiply them you will get this.... 3,897,583,913,560,042,260,642,265,383,304,444,890,358,227,979,468,800,000,000,000,000,000,000,000,000,000,000,000 i did it on my phone
Mathematica
NestList[(Times@@@Partition[#,{2},1])&,Range@8,7]
gives
{1, 2, 3, 4, 5, 6, 7, 8},
{2, 6, 12, 20, 30, 42, 56},
{12, 72, 240, 600, 1260, 2352},
{864, 17280, 144000, 756000, 2963520},
{14929920, 2488320000, 108864000000, 2240421120000},
{37150418534400000, 270888468480000000000, 243901204807680000000000},
{10063619980174622195712000000000000000, 66070023830779248141926400000000000000000000}, {664903611914043473202543232567979684173499596800000000000000000000000000000000000}
Problem Loading...
Note Loading...
Set Loading...
The values in the second row and thereafter denote the number of zeroes present in that number.