Midterm THsolutions
Midterm THsolutions
Pn 2
(1) (a) Derive a formula for i=1 i using the division of a triangular prism into three
triangular pyramids.
We have seen that i2 = T (i − 1) + T (i), wherePT (i) is the ith Ptriangular
number, so the problem is reduced to calculating ni=1 T (i−1)+ ni=1 T (i) =
Pn−1 Pn Pn th
i=1 T (i) + i=1 T (i). Let P (n) = i=1 T (i), which we’ll call the n
pyramidal number.
The division of the prism into three pyramids illustrates the equation P (n)+
2P (n − 1) = nT (n). The additional recursive equation P (n) = P (n −
1) + T (n) allows us to solve for P (n) and P (n − 1), obtaining P (n −
1) = (n−1)T3
(n)
= (n−1)(n)(n+1)
6
(using the known formula T (n) = n(n+1)
2
) and
n(n+1)(n+2) Pn 2
P (n) = 6
. Adding these together we obtain i=1 i = P (n − 1) +
n(n+1)(2n+1)
P (n) = 6
. You may remember this formula from calculus, while
having had no idea how anyone every thought of it!
(b) Prove the formula you derived.
This is a simple proof by induction. The case n = 1 is easily checked: 1 =
Pn−1 2 (n−1)(n)(2(n−1)+1)
12 = (1)(2)(3)
6
. Assume as inductive hypothesis that i=1 i = 6
=
(n−1)(n)(2n−1) Pn 2 (n−1)(n)(2n−1) 2 (n−1)(n)(2n−1)+6n2
6
. Then i=1 i = 6
+n = 6
=
n[(n−1)(2n−1)+6n] n[2n2 −3n+1+6n] n[2n2 +3n+1] n(n+1)(2n+1)
6
= 6
= 6
= 6
.
(2) (a) You may have noticed that in the addition and multiplication tables in bases
b = 7 and b = 12 the entries in the lower right corner of each, for (b − 1) + (b − 1)
and (b − 1)(b − 1), have their digits exchanged: 6 + 6 = 15(7) and 6 · 6 = 51(7) ;
e + e = 1t(12) and e · e = t1(12) (where e = 11 and t = 12). Is this true in any
base? If so, prove it; if not, give a counterexample.
This relationship is true in any base, as is easily seen by considering the
general case. (b − 1) + (b − 1) = 2b − 2 = b + (b − 2), so its digits, from left
to right, are 1 and b − 2. (b − 1)(b − 1) = b2 − 2b + 1 = (b − 2)b + 1, so its
digits, from left to right, are b − 2 and 1.
(b) Provide and prove a general formula for the number of digits in the numeral in
base b for a number n, in terms of b and n.
A number n in base b has N digits if bN −1 ≤ n < bN ; equivalently, N − 1 ≤
logb n < N . Thus, N is the least integer strictly greater than logb n. This is
most succinctly written as N = blogb nc + 1, where b c denotes the integer
part.
(c) Provide a general description of the regular numbers and their reciprocals as radix
fractions in base 2 and in base 4.
A number is regular in base 2 if it is a power of 2. The reciprocal of 2n has
radix fraction .0 · · · 01, with n − 1 zeros. The regular numbers in base 4 are
also the powers of two, but the radix fraction numerals for their reciprocals
are different. There are two cases: either the regular number is a power of 4,
say 4n , in which case its reciprocal has the form .0 · · · 01, with n − 1 zeros, or
it is twice a power of 4, say 2 · 4n , in which case its reciprocal has the form
.0 · · · 02, with n − 1 zeros.
1
(3) (a) Derive and justify, both√geometrically and analytically, a formula for the best
linear approximation to 3 a3√+ h. (In other words, derive and justify the correct
coefficient k in the formula 3 a3 + h = a + kh.)
For the geometric perspective, it would perhaps be helpful to review the
case
√ of square roots, for which our picture is two dimensional. In Figure
1, a2 + h = a + ∆, where h and ∆ are positive in the figure at left and
negative in the figure at right. In both figures, the gray area is the magnitude
of h. In the figure at left, for which a underestimates the square root, each
darker gray rectangle has area slightly less than h2 (the difference being half
h h
the small square in the corner), so ∆ is slightly less than 2a . Thus, a + 2a
is the best linear approximation and is slightly too large. (We know it is
the best linear approximation because the difference from the exact answer
is proportional to ∆2 .) In the figure at right, for which a overestimates the
square root, the darker gray rectangles, which now overlap in the corner,
each have area slightly more than h2 (with the difference again being half
h
the square in the corner), so ∆ is slightly more than 2a . Thus, in adding
h h
2a
we are subtracting less than ∆, so the best linear approximation, a + 2a ,
remains an overestimate.
a
D
D
a
a
a
D D
Figure 1
√
To find the best linear approximation to 3 a3 + h we simply need a three-
dimensional version of this picture. In Figure 2 I present the case that h
and ∆ are positive, since it is easier to visualize in three dimensions. I have
not shaded the entire difference in volumes, h, since the smaller cube is
hidden, and hence the shading added nothing helpful to the picture. Each
of the shaded blocks is slightly less than h3 (the difference being the three
rectangular solids with square cross section along the edges of the smaller
cube, which have volume proportional to ∆2 , together with the cube in
the corner, which of course has volume ∆3√ ). Thus, ∆ is slightly less than
h 3
3a2
, and the best linear approximation to a3 + h, which is once again an
overestimate, is a + 3ah2 .
To derive this result analytically,
√ we determine the linear Taylor polynomial
2
for the function f (h) = a + h, centered at h = 0. f 0 (h) = 13 (a3 + h)− 3 ;
3 3
a D
Figure 2
AQ = 1+ 3 3
2 1
A 1 P 1 B Q
Figure 3
√ √
(b) Need it be true that 3 p and 3 q are incommensurable? If so, prove it. If not, give
a counterexample.
Yes. Similar reasoning applies, but now we are considering how the number
of factors differs from a multiple of 3. Suppose by way of contradiction
√ √
that, for some positive integers k and l, k 3 p = l 3 q. Then k 3 p = l3 q. The
number of times p occurs as a factor of k 3 p is one more than a multiple
of 3, whereas the number of times p occurs as a factor of l3 q is exactly a
multiple of 3 (possibly 0). Since the remainder when dividing by 3 is uniquely
determined, these numbers cannot be equal, and we have a contradiction.
Or, more simply and specifically put, a number cannot be both a multiple
of 3 and not a multiple of 3. (As before, counting the factors of q also leads
to a contradiction.)
√ √
(c) What can we say in general about n p and n q, where n is a positive integer
greater than 1? Prove your answer is correct!
√ √
In general, n p and n q are incommensurable. The remainder when a whole
number is divided by n is uniquely determined as one of {0, 1, 2, . . . , n − 1}.
Suppose by way of contradiction that, for some positive integers k and l,
√ √
k n p = l n q. Then k n p = ln q. The number of times p occurs as a factor
of k n p is one more than a multiple of n, whereas the number of times p
occurs as a factor of ln q is exactly a multiple of n, so we once more obtain a
contradiction.