WoodCentral Forums

Est. 1998 — 27 years of woodworking knowledge

Friday Puzzler -- Golf Balls

Posts

Friday Puzzler -- Golf Balls

#1

Friday Puzzler -- Golf Balls

Alex Y

Sometimes at an upscale practice facility, there will be a pyramid of practice golf balls at each station.

If that pyramid is four layers of golf balls, how many will there be in all?

In general, if the golf ball pyramid is n balls high, how many will there be?

Here is a pyramid 3 balls high, in case there is any ambiguity in my wording.


Re: Friday Puzzler -- Golf Balls

#2

Re: Friday Puzzler -- Golf Balls

Henry Higginbotham

I've had the formula for a square pyramidal number (along with triangular number and tetrahedral number) written neatly on a PostIt in my wallet for a couple years, ever since the day after I bought range balls at a local course and noticed that they had a display with a 7x7 pyramid labeled as "144 balls."

My intent was to show them how to do it, but I later decided that was probably a fool's errand. They actually dole them out in little buckets, so no telling how many you'd actually get.

Re: Friday Puzzler -- Golf Balls

#3

Re: Friday Puzzler -- Golf Balls

johnv

For those of us old enough to remember, the answer is 1 year before we were old enough to not be trusted.

Re: Friday Puzzler -- Golf Balls

#4

Re: Friday Puzzler -- Golf Balls

Ed in Leaside

In general, visually, it looks like some squares.

Re: Friday Puzzler -- Golf Balls

#5

Correct for n=4

Alex Y

How about the general case?

Re: Friday Puzzler -- Golf Balls

#6

Re: Friday Puzzler -- Golf Balls

Alex Y

Yes, and adding those squares is the easiest solution when n is small. But how about a formula that gets you the answer for large n with no appreciable increase in effort?

Re: Friday Puzzler -- Golf Balls

#7

Re: Friday Puzzler -- Golf Balls

Alex Y

I hope they have you the full 144 in the bucket, not just the ones from the pyramid.

Re: Friday Puzzler -- Golf Balls

#8

Re: Friday Puzzler -- Golf Balls - a start

Larry Barrett

I don't have a formula yet, but I think the key to getting one is to recall two things from HS (or maybe grade school) math:

(n+1)^2 = n^2 +2n + 1, so a square can be expressed in terms as a square of the next lower integer, plus 2* that lower integer, plus 1. For example,

4^2 = 16 = 3^2 + 2*3 + 1. And 3^2 = 2^2 +2*2 + 1, etc. So n^2 can be converted into an equation involving only integers.

The other thing to recall is that the sum of integers from 1 to n = n(n+1)/2. As I recall it, this formula was discovered by one of the 18th century mathematicians (maybe Gauss or Euler, one of those geniuses), while in grade school.

So I think the sum of squares from 1 to n can be converted into a formula, tbd, involving the sum of integers from 1 to n.

Re: Friday Puzzler -- Golf Balls

#9

Re: Friday Puzzler -- Golf Balls - a start

Alex Y

Remember that derivation (or maybe demonstration?) of the sum from 1 to n is n*(n+1)/2:

If x is the sum of 1 to n,

x=1 + 2 + 3 +...+(n-2)+(n-1)+n, or

x=n +(n-1)+(n-2)+...+ 3 + 2 +1

Adding those two:

2x=(n+1)+(n+1)... n times

2x = n*(n+1)

x=n*(n+1)/2

The formula for sum of squares takes a similar, but much more complex route. Just as a starter, express the sum of squares from 1^2 to n^2 as a triangle:

1

2 2

3 3 3

4 4 4 4

5 5 5 5 5

..............

n n n n n...n

The sum of numbers on each row is the square of the number defining that row, and the sum of all the numbers in the triangle is the sum of squares that we are looking for.

Best to write the triangle as an equilateral triangle, with each row centered on the page.

I'll post next steps next week, but unless you have seen this, I know I never would have gotten it!

Re: Friday Puzzler -- Golf Balls

#10

Re: Friday Puzzler -- Golf Balls - a start

Larry Barrett

What follows may be of interest to math nerds. It is not a complete answer to the problem of finding a simple formula for the sum of squares, but is an interesting exercise, at least for me, and seems likely to lead to an answer if more time is expended.

Continuing with the idea of expressing the square of an integer, i^2, in terms of smaller integers, using the equation i^2 = ((i-1) +1)^2 = (i-1)^2 + 2(i-1) +1.

Here are some examples:

For i=1, 1^2 = 1

For i=2, 2^2 = 1 + 2(1) + 1 = 2+2(1)

For i=3, 3^2 = 2^2 + 2(2) +1, and substituting what we know for 2^2 =

= 3+2(1)+2(2)

Continuing, always substituting for the higher squares what we know for lower squares,

For i=4, 4^2 = 4+2(1)+2(2)+2(3)

For i=5, 5^2 = 5+2(1)+2(2)+2(3)+2(4)

and in general,

For i=n, n^2 = n+2(1)+2(2)+... 2(n-1).

As a check, for n=7 we get 7^2=49= 7+2(1)+2(2)+...2(6) =7+2(1+2+3+4+5+6) =7+2(21)=7+42=49.

Now we need to look at the sum of squares to see if a general formula can be derived. For problems like this, I often start with small numbers to see if a pattern exists which can be extrapolated to the general problem.

The usual way to write the sum of the values of a function is to use the Greek letter Sigma with the notation that i starts at 1 and continuing to n. Since Greek letters and the usual notation aren't available, as a shorthand for this I will use S(n). So the notation S(n)i^2 means the sum of the values of i^2 for i starting at 1 and continuing to n. As you will see, the result will be include the sum of the integers (not squared), so you will also see this notation: S(n)i to mean the sum of the integers from i=1 to i=n; and for this we already know that

S(n)i = n(n+1)/2.

So S(1)i^2 is simply 1.

Using the expressions for i^2 above,

S(2)i^2 = S(2)i + 2(1) = 3+2(1)= 5

S(3)i^2 = S(3)i + 2((2*1)) + 2*2 = 6 + 2(2+2) = 14

S(4)i^2 = S(4)i + 3(2*1) + 2(2*2) +1(2*3) = 10 + 2(3+4+3) = 30

S(5)i^2 = S(5)i + 4(2^1) + 3(2*2) + 2(2*3) + 1(2*4)= 15 + 2(4+6+6+4) =55

An interesting pattern is beginning to emerge. The next sum of squares (for i from 1 to 6) will include the sum of the integers from 1 to 6 and will include a term that looks like 2(...) where the numbers inside the (...) seem to have some relation to the numbers in the previous sums. Extending the sum of squares for i=6 and i=7, this is what it looks like:

S(6)i^2 = S(6)i + 2(5+8+9+8+5) = 21 + 70 = 91

S(7)I^2 = S(7)i + 2(6+10+12+12+10+6) = 28 + 102 = 140

If you look at the numbers inside the (...), beginning with 1=1 and extending to i=8, they form a triangle like this:

1

2 2

3 4 3

4 6 6 4

5 8 9 8 5

6 10 12 12 10 6

7 12 15 16 15 12 7

If you look at this as an equilateral triangle, it is easy to see the patterns that are formed.

I believe the pattern could be extended to some arbitrary value of i=n. So far I have not tried to write a formula to express this. I expect that there must be a simpler way to express the formula for the sum of squares; maybe what Alex offers next week will be the answer.

As an aside, this 'triangle' looks a little like Pascal's triangle which is used to express the coefficients of the binomial expansion, and looks like

1

1 2 1

1 3 3 1

1 4 6 4 1

...

where the numbers in the next row have can be derived from the numbers in the row above.

Re: Friday Puzzler -- Golf Balls

#11

Re: Friday Puzzler -- Golf Balls - a start

Alex Y

Interesting, and looks like it may yield a formula.

You said:

1

2 2

3 4 3

4 6 6 4

5 8 9 8 5

6 10 12 12 10 6

7 12 15 16 15 12 7

If you look at this as an equilateral triangle, it is easy to see the patterns that are formed.


Maybe it's easy for you, but I don't see it. :-) Yes, I see some sort of pattern, with the symmetry and with numbers increasing toward the interior. But if I am on line 4, how do I know that there are two 6s rather than 5s or 7s between the 4s? And how do I know 898 appears between the 5s?

Re: Friday Puzzler -- Golf Balls

#12

Re: Friday Puzzler -- Golf Balls - a start

Larry Barrett

Here are patterns that I see:

The first column (it would be the left side of the equi triangle if drawn that way) are the integers 1,2,3,4,5,.... The right side of the triangle is the same.

Look at the second column: 2,4,6,8,10,12 ...

Look at the third column: 3,6,9,12,15 ...

Fourth column: 4,8,12,16, ...

Again, if a triangle these patterns would be easy to see. There is also symmetry in each row, similar to what you see in the Pascal triangle.

I think I could extend it to the nth row fairly easily. For example, the next row, representing the numbers in the (...) for the 9th sum of squares, would be

8 14 18 20 20 18 14 7

The sum of squares from 1 to 9 = the sum of squares from 1 to 7, which we know is 140, plus 8^2 = 64 plus 9^2 =81, so sum is 285.

Using the 'formula' that I created in the last post,

S(9)i^2 = S(9)i + 2(8+14+18+20+20+18+14+8); S(9)i = 9*10/2 =45.

Evaluating the other term = 2(16+28+36+40) = 2*120 = 240. 240+25 = 285.

Re: Friday Puzzler -- Golf Balls

#13

Re: Friday Puzzler -- Golf Balls - a start

Larry Barrett

Alex - I think I did not directly answer your question - 'how do I know that there are two 6s rather than 5s or 7s between the 4s?'

The answer to that is that I explicitly derived the sums of squares from 1 to 6 in my earlier note. That is how I know what the values in the triangle are up to that point. What I was explaining in my last note was that, given this triangle as a starting point, I believe I can extrapolate from this point to higher sums of squares, and that was what I did for the sum up to 9^2.

Re: Friday Puzzler -- Golf Balls

#14

Re: Friday Puzzler -- Golf Balls - a start

Alex Y

Here are patterns that I see:

The first column (it would be the left side of the equi triangle if drawn that way) are the integers 1,2,3,4,5,.... The right side of the triangle is the same.

Look at the second column: 2,4,6,8,10,12 ...

Look at the third column: 3,6,9,12,15 ...

Fourth column: 4,8,12,16, ...


Wow! Totally missed that! And so obvious once you pointed it out...

Re: Friday Puzzler -- Golf Balls

#15

Re: Friday Puzzler -- Golf Balls - a start

Alex Y

Okay, stop reading if you are looking for a clever puzzle for entertainment--you will probably find this boring. You have been warned...

We have expressed the sum of squares as the total of numbers in a triangle made up of one 1, followed by two 2s, then three 3s.... n ns. For illustration, I'm going to use n=5. If x is the sum of squares, then x is the sum of numbers in this triangle (imagine it as equilateral):

1

2 2

3 3 3

4 4 4 4

5 5 5 5 5

Now rotate this triangle (120 degrees if you have it as equilateral) twice to get triangles with the same elements:

5

4 5

3 4 5

2 3 4 5

1 2 3 4 5

and

5

5 4

5 4 3

5 4 3 2

5 4 3 2 1

now, 3x is gotten by adding these three triangles. In our case, the sum in each position is 11, which is 2n+1 (this holds for all n).

We have 1 + 2 + 3 + 4 + 5 = 15 = n(n+1)/2 positions

So the total of the numbers in these three triangles is

(2n+1)*n*(n+1)/2

This is the sum of all three triangles, which is three times the sum of squares we want, so x = (2n+1)*n*(n+1)/6, or with a little manipulation,

(n^3)/3 + (n^2)/2 + n/6

Testing for n=5:

125/3 + 25/2 +5/6 = (250+75+5)/6 = 330/6 = 55

1+4+9+16+25 = 55

👍 This page answered my questions

Your vote helps other woodworkers quickly find the answers and techniques that actually work in the shop.