concrete mathematics: a portfolio of problemsszroberson/concretemath_szr.pdf · 2017. 3. 24. ·...

22
Texas A&M University - San Antonio Concrete Mathematics Concrete Mathematics: A Portfolio of Problems Author: Sean Zachary Roberson Supervisor: Prof. Donald Myers July 1, 2014

Upload: others

Post on 02-Feb-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

  • Texas A&M University - SanAntonio

    Concrete Mathematics

    Concrete Mathematics: APortfolio of Problems

    Author:Sean ZacharyRoberson

    Supervisor:Prof. Donald Myers

    July 1, 2014

  • 1 Chapter 1: Recurrent Problems

    Many problems in mathematics are recurrent problems, meaning that they are defined in terms of themselves.

    For example, one can find the greatest common divisor of two integers a and b by the following relation:

    gcd(a, a) = 1;

    gcd(a, b) = gcd(b, a mod b)

    Each successive step reduces the problem into a simpler case. Another recursive function is the factorial:

    a0 = 1;

    a1 = 1;

    an = nan−1

    Solving these recurrences can be done in many ways. One may be able to deduce a closed form after

    finding a pattern in the first few terms. Another method is to unfold the recurrence by successively plugging

    in previous terms until the base case is reached. Other methods include using the characteristic polynomial

    for linear recurrences, or the use of generating functions for general recurrences. Generating functions will

    be examined in depth in Chapter 7 (see the section titled Generating Functions).

    In this section, we examine one well-known recurrent problem, known as the Josephus Problem. Ac-

    cording to legend, Flavius Josephus and a group of Jewish rebels were captured by Romans. The rebels

    formed a circle and killed every third person in the circle until all were dead. The main question of the

    Josephus problem is as follows:

    Suppose n people, numbered from 1 to n, stand in a circle. If every other person is killed, which person

    is the last to survive?

    To investigate this problem, suppose there are six people in the circle. The first person to die is numbered

    2, then next is 4, followed by 6, 3, and 1. The person numbered 5 is the last one surviving. Let J(n) be the

    person left standing after all other n− 1 persons have killed themselves. We can then say J(6) = 5.

    Now, let us suppose that we have 2n people in this circle at the start. The first person to die is number

    2, then 4, and every even-numbered person until the sword (or whatever object is used to commit suicide

    with) returns to person number 1. Now, only odd-numbered persons are left in the circle. This situation is

    similar to starting with n people, only this time their labels have been multiplied by 2 and had 1 subtracted.

    For example, person 5 would become person 9. So, a form for the survivor amongst an even-numbered group

    of people is

    J(2n) = 2J(n)− 1.

    Using the fact that J(6) = 5, we can deduce that J(12) = 2J(6) − 1 = 9. We can then conclude that

    J(24) = 17, and J(48) = 33.

    1

  • But what if there are an odd number of people from the start, say, 2n+ 1? Execution begins as normal,

    with persons 2, 4, 6, 8, . . . , 2n dying in the first trip around the circle, but now the next to die after 2n is

    person 1. The people left in the circle are 3, 5, 7, . . . , 2n + 1. This is similar to the case with n people, as

    before, but now numbers are increased by 1 after they are doubled, not decreased by 1. Again, we have a

    form for determining the survivor in a group of 2n+ 1 people; that is,

    J(2n+ 1) = 2J(n) + 1.

    For example, J(15) = 2J(7) + 1 = 2(2J(3) + 1) + 1 = 15. Combining the previous two general forms with

    the base case J(1) = 1, we have the following recursion:

    J(1) = 1;

    J(2n) = 2J(n)− 1;

    J(2n+ 1) = 2J(n) + 1.

    For this recursion, it is sufficient to divide the number of people in the circle by 2 and round down to the

    nearest integer. Repeated application will give the survivor’s number.

    What if we desire a closed-form solution? Such a solution is possible to construct. First, let us generate

    a short table of values of J(n).

    n J(n)

    1 1

    2 1

    3 3

    4 1

    5 3

    6 5

    7 7

    8 1

    9 3

    10 5

    11 7

    12 9

    13 11

    14 13

    15 15

    16 1

    Notice that the table is blocked in certain areas. This sparks some curious thought.

    2

  • First, let’s see what happens to powers of two. Suppose k is an integer that is at least zero. Then what

    is J(2k)? For k = 0, we have J(1) = 1, and for k = 1, we have J(2) = 1 (from the table). Now, assume that,

    for all integers k up to j, that J(2j) = 1. Now, for k = j + 1, we have:

    J(2j+1) = 2J(2j)− 1

    = 2(1)− 1

    = 1

    as needed. Hence J(2k) = 1, where k is an integer greater than or equal to zero.

    What’s next to show? Let’s try to see what happens between powers of two, say, from 8 to 16. We see

    that J(8) = 1, J(9) = 3, J(10) = 5, and J(11) = 7. What’s happening? The value of the function increases

    by 2 as n increases by 1. But, we see that J(15) = 15, and J(16) = 1. So, something happens between

    n = 2j − 1 and n = 2j . Observe that 15 = 23 + 7, and 16 = 24. From the table, this is a transition between

    new blocks. But what happens at this transition? We see that 8 is the largest power of two that does not

    exceed 15. While 8 is not larger than 16, it is not the biggest power of two that is less than 16 (here, the

    desired number is 16). We almost see a pattern. Let l = n− 2j , where 2j = max{2p|2p < n}. We conjecture

    that J(n) = 2l + 1.

    For n = 1, that is, 1 = 20 + 0, we have J(1) = 1, as needed. The case n = 2 is trivial, by the previous

    derivation, so we move to n = 3. Here, we write 3 = 21 + 1 and so J(3) = 2(1) + 1 = 3. Now assume this

    holds for every n = 2j , inducting on j. For the case j = q + 1, we must first consider even l.

    So, suppose l is even. Then

    J(2q+1 + l) = 2(J(2q + l/2))− 1

    = 2(2(l/2) + 1)− 1

    = 2l + 1

    as needed.

    Otherwise, when l is odd (say, l = 2p+ 1), the induction step is as follows:

    J(2q+1 + 2p+ 1) = 2J(2q + p) + 1

    = 2(2p+ 1) + 1

    = 2(l − 1) + 3

    = 2l + 1

    From the first to the second line, we assumed that p was even. However, it can be shown that any

    even number can be divided by 2 a finite number of times to produce an odd number. So, for odd l,

    J(2q + l) = 2l + 1.

    3

  • We combine this with the previous result to give a suitable closed form solution for the Josephus problem:

    J(n) = 2l + 1

    where n = 2q + l, and l < 2q.

    8. Solve the recurrence

    Q0 = α;

    Q1 = β;

    Qn =1 +Qn−1Qn−2

    .

    Solution.

    The recurrence doesn’t seem to have any recognizable pattern at first, so the best way to proceed is to

    start finding terms using the initial conditions.

    Q2 =1 + β

    α

    Q3 =1 +

    1 + β

    αβ

    =1 + α+ β

    αβ

    Q4 =

    1 +1 + α+ β

    αβ1 + β

    α

    =1 + α

    β

    Q5 =

    1 +1 + α

    β1 + α+ β

    αβ

    = α

    But, note that Q5 = Q0. This suggests that for every n, Qn = Qn−5. This recurrence is linear, and it

    can be solved. To solve this recurrence, let rn = Qn. Then we have rn = rn−5, or, equivalently, r5 = 1.

    Solving this equation in the complex numbers gives the solution r = cos(2π5

    )+ i sin

    (2π5

    ). This value of r

    can actually be written as exp(2πi5

    ). To account for the initial condition, it suffices to solve

    α = c1 exp

    (2πi · 0

    5

    ),

    whose solution gives c1 = α. Hence, the solution to the recurrence is

    Qn = α exp

    (2nπi

    5

    ).

    4

  • 2 Chapter 2: Sums

    In mathematics, sums appear in almost every branch. For example, they appear in linear algebra when

    computing the (i, j) entry of a matrix product:

    cij =

    n∑k=1

    aikbkj

    where the sum is across k. Also, they appear in calculus and analysis when approximating a function

    with a polynomial:

    T (x) =

    ∞∑j=0

    f (j)(a)

    j!(x− a)j

    But how do sums really work? How can one manipulate a sum and get a closed form?

    There are many ways to view a sum. First, one can view a sum as a recurrence. Suppose, for the sake of

    example, that Sn =∑nj=0 aj , where the terms aj come from a sequence. Observe that the sum can also be

    written as the following recurrence:

    S0 = a0;

    Sn = Sn−1 + an.

    This recurrence says that each successive value of the sum depends on the previous terms.

    There are many well-known sums to keep in mind. Suppose one wishes to sum the first n integers in

    succession; that is, what is 1+2+3+ . . .+n? There are many ways to solve this problem. Perhaps one of the

    most well-known ways to find this sum is by adding a copy of the sum to itself. This technique is attributed

    to Gauss, and is told through a story. Following Gauss’ method, we see that, after first calling our sum S,

    2S = 1 + 2 + 3 + . . .+ n+ 1 + 2 + 3 + . . .+ n

    = (n+ 1) + (n+ 1) + . . .+ (n+ 1)︸ ︷︷ ︸n terms

    = n(n+ 1)

    And from this, we deduce that S =n(n+ 1)

    2. These are called the triangular numbers. Using the

    notation above, we can also write the sum as S =∑nj=0 j =

    n(n+ 1)

    2.

    Working with sums may require trickery sometimes. For example, it may be advantageous to change the

    index of summation to force a form already known. In the sum

    7∑j=3

    j

    can make the substitution j = n+ 2 so that the sum transforms to

    5∑n=1

    n+ 3

    5

  • and this sum is easier to evaluate. Because sums arise so often, particular sums have been given names,

    like the triangular numbers. One other special sum gives the square pyramidal numbers, which come from

    the sum of the first n integer squares:

    Pn =

    n∑j=1

    j2 =n(n+ 1)(2n+ 1)

    6

    There is also a name for the sum of the first n unit fractions, the harmonic numbers.

    Hn =

    n∑j=1

    1

    j

    So, sums do appear often in mathematics, but sometimes more tools are needed, other than expanding

    the sum, adding it to itself, and re-indexing. What else can be used to evaluate a sum? Fortunately, there

    is a powerful tool available, involving a discrete analogue to calculus.

    In calculus, one can differentiate functions by the following definition:

    f ′(x) = limh→0

    f(x+ h)− f(x)h

    The finite calculus has a similar operator, the difference operator. Just like the derivative of infinite

    calculus, the difference operator ∆ shows change. It is defined as:

    ∆f(x) = f(x+ 1)− f(x)

    The difference operator can be thought of the differential operator in which h = 1.

    So, how can we use the difference operator? It works just like differentiation. For example, what is

    ∆(x2)? By the definition, it is (x+ 1)2 − x2 = 2x+ 1. In infinite calculus, polynomials differentiate well by

    the power rule. Finite calculus doesn’t do the same sort of thing with ordinary polynomials, as seen above.

    A new type of power can be defined that transforms well under the difference operator. This new power is a

    falling power, defined as

    xn =

    n factors︷ ︸︸ ︷x(x− 1)(x− 2) . . . (x−m+ 1)

    It is left to the reader to verify that ∆(xn) = nxn−1.

    Just as the differential operator D in infinite calculus has an “inverse” operator∫

    , the difference operator

    ∆ has an “inverse,” the sum (or anti-difference) operator∑

    . So, just as we say

    g(x) = D(f(x)) ⇐⇒∫g(x) dx = f(x) + C

    we can say

    g(x) = ∆f(x) ⇐⇒∑

    g(x) δx = f(x) + C

    where∑g(x) δx describes all functions whose difference is g(x). Also, the C that comes as a result of

    indefinite summation need not be a constant; it can be a function φ(x+ 1) = φ(x).

    6

  • Definite summation can be defined like definite integration. We have

    b∑a

    g(x) δx = f(x)∣∣∣ba

    = f(b)− f(a).

    Many of the usual differentiation rules carry over to the finite calculus. The difference operator is linear,

    so it preserves addition and scalar multiplication. That is,

    ∆(αf + βg) = α∆(f) + β∆(g).

    A product rule also exists:

    ∆(u(x)v(x)) = u(x+ 1)v(x+ 1)− u(x)v(x)

    = u(x+ 1)v(x+ 1)− u(x)v(x+ 1) + u(x)v(x+ 1)− u(x)v(x)

    = v(x+ 1)(u(x+ 1)− u(x)) + u(x)(v(x+ 1)− v(x))

    = v(x+ 1)∆u(x) + u(x)∆v(x)

    = Ev(x)∆u(x) + u(x)∆v(x)

    where Ef(x) = f(x+ 1).

    Now, just as integration by parts can be derived by the product rule of infinite calculus, a discrete analogue

    of this method exists in the finite calculus. The following steps are true:

    ∆(u(x)v(x)) = Ev(x)∆u(x) + u(x)∆v(x)

    ⇐⇒∑

    ∆(u(x)v(x)) δx =∑

    Ev(x)∆u(x) + u(x)∆v(x) δx

    ⇐⇒ u(x)v(x) =∑

    u(x)∆v(x) + Ev(x)∆u(x)

    ⇐⇒∑

    u(x)∆v(x) = u(x)v(x)−∑

    Ev(x)∆u(x)

    The last line gives the summation by parts formula:

    ∑u(x)∆v(x) = u(x)v(x)−

    ∑Ev(x)∆u(x)

    A proof of this formula using rules of summation is given at the end of this section.

    What follows are example sums that can be evaluated with summation by parts. First, examine the sum

    ∑Hx δx.

    This is an indefinite sum of harmonic numbers. The harmonic numbers are the discrete analogue of

    natural logarithms. To see this, consider the integral∫lnx dx.

    7

  • With the choices u = lnx, dv = dx, integration by parts gives x lnx− x+C. The same reasoning is used

    for this sum: let u = Hx, and ∆v = 1. We then have:∑Hx δx = xHx −

    ∑δx

    = xHx − x+ C

    Another example involves exponential functions. What is∑xcx δx,

    where c is an integer other than 1? Again, consider this the discrete analogue of the integral∫xex dx,

    whose result is xex − ex + C. Again, proceed by summation by parts: let u = x and ∆v = cx. Then the

    sum is now: ∑xcx δx =

    xcx

    c− 1− 1c

    ∑(c+ 1)x δx

    =xcx

    c− 1− (c+ 1)

    x

    c2+ C

    What follows is an alternative proof of summation by parts.

    11. The general rule (2.56) for summation by parts is equivalent to∑0≤k

  • 3 Chapter 3: Integer Functions

    There are two functions that are used in computer science for estimates. These functions, known as the

    floor and ceiling, allow a person to force any real number to an integer. Both these functions are related

    by inequalities; this relationship will be explained below.

    The floor function maps a real number x to the largest integer that does not exceed x. In short, it rounds

    the number down. The floor of x is denoted bxc. For example, b3.5c = 3 and b12.9999c = 12.

    The ceiling function behaves similarly. It maps a real number x to the smallest integer that exceeds

    x. The ceiling of x is denoted by dxe. In short, it rounds a number up. For example, d3.14e = 3 and

    d2.00001e = 3.

    The floor and ceiling functions are related by a series of inequalities. The first should be easy to see:

    bxc ≤ x ≤ dxe

    This inequality can actually be extended in both directions by adding x− 1 on the lower end and x+ 1

    on the upper end:

    x− 1bxc ≤ x ≤ dxe < x+ 1

    Observe that there is strict inequality in the ends, while equality can occur in the middle terms. This

    equality is met when x is an integer.

    There are a series of equivalences that involve floors and ceilings; these can be used to simplify expressions

    in computations:

    bxc = m ⇐⇒ m ≤ x < m+ 1

    dxe = n ⇐⇒ n− 1 < x ≤ n

    bxc = m ⇐⇒ x− 1 < m ≤ x

    dxe = n ⇐⇒ x ≤ n < x+ 1

    Manipulating sums with floors and ceilings takes extra work. For example, consider the sum

    m∑k=0

    b√kc

    If a table of values of b√kc were to be created, one would find that there are repeated occurrences of b

    √kc

    in each interval [n2, (n+ 1)2 − 1]. In order to find the desired sum, we must first count the number of times

    b√kc appears in each interval. Each interval, except possibly the last, sums to k(2k + 1). The last interval

    may not contain this number, so it is enough to call the sum in the last interval b√mc(m− b

    √mc2 + 1

    ).

    The remaining sum is as follows:

    b√mc−1∑k=0

    k(2k + 1) =n(n+ 1)(2n+ 1)

    3+n(n+ 1)

    2

    9

  • where n = b√mc − 1. The final sum is then

    m∑k=0

    b√kc = n(n+ 1)(2n+ 1)

    3+n(n+ 1)

    2+ (n+ 1)(m− (n+ 1)2 + 1).

    4 Chapter 4: Number Theory

    The study of number theory is centered around the integers. There are many functions whose domain is the

    set of integers. In number theory, some important functions include the Euler phi function φ(n), and the

    Möbius mu function µ(n). This section will focus on these two functions and their relationship to one

    another.

    The Euler phi function counts the number of positive integers less than n that are relatively prime to n.

    So, if S = {m ∈ N | gcd(m,n) = 1 and m < n}, then φ(n) = |S|. For small values of n, one can find φ(n) by

    counting the integers that satisfy the condition. For example, φ(6) = 2 and φ(11) = 10. For larger numbers,

    it may be more difficult to count the integers relatively prime to n and less than n (unless a computer is

    programmed to do so).

    Before attempting to find a way to compute the number of integers less than and relatively prime to n,

    it would be wise to first observe what happens when n is prime, or a prime power. So, suppose p is a prime.

    The integers less than p are {1, 2, 3, . . . , p − 1}. But which of these are relatively prime to p? Recall that a

    prime has only two divisors, 1 and itself (these are called the trivial divisors). Since p is prime, none of the

    integers from 1 to p− 1 divide evenly into p. So, φ(p) = p− 1.

    What about φ(p2)? A similar argument can be used. Construct the set

    S = {1, 2, . . . , p− 1, p, . . . , 2p, . . . , p(p− 1), . . . , p2}

    Note that p divides p2, so any multiple of p not exceeding p2 will divide p2. In S, there are p− multiples of

    p that divide p2. The phi function counts the integers relatively prime to p2, so we must have φ(p2) = p2−p.

    In general, we have, for prime p,

    φ(pn) = pn − pn−1.

    There are two ways to use the phi function without directly counting the integers that meet the require-

    ment. One way is to use a product definition:

    φ(n) =∏p|n

    (p− 1p

    )

    where the product is taken over all primes p that divide n. A derivation of this formula is omitted.

    A second way is to use the fact that the phi function is multiplicative. That is, when m and n are

    relatively prime, then

    φ(mn) = φ(m)φ(n).

    10

  • This helps in breaking the argument into smaller factors for which the values of the function are easily

    known. For example:

    φ(78) = φ(2)φ(39)

    = φ(2)φ(3)φ(13)

    = 1 · 2 · 12

    = 24.

    The Möbius function is a function that depends on the prime factorization of an integer n. It is is defined

    as follows:

    µ(x) =

    1, n = 1;

    (−1)r, if n is a product of r distinct primes;

    0, if n is not squarefree.

    For example, µ(6) = 1 and µ(36) = 0.

    It is important to note that if one sums values of µ(n) over the factors of n, the sum will be zero except

    when n = 1. That is, ∑d|n

    µ(d) = [n = 1].

    For example,

    ∑d|16

    µ(d) = µ(1) + µ(2) + µ(4) + µ(8) + µ(16)

    = 1− 1 + 0 + 0 + 0

    = 0.

    Just like the phi function, the mu function is multiplicative. Again, when m and n are relatively prime,

    µ(mn) = µ(m)µ(n).

    Both the phi and mu functions are examples of arithmetic functions. These functions preserve either

    addition or multiplication, much like a homomorphism. A special product can be defined with arithmetic

    functions, using a sum. This product is called the Dirichlet convolution, written as (f ∗ g)(n), where f

    and g are arithmetic functions. The convolution is defined as follows:

    (f ∗ g)(n) =∑d|n

    f(d)g(nd

    )Two equivalent convolutions are of great importance. The Möbius inversion formula, due to Richard

    Dedekind and Joseph Liouville, states that

    g(n) =∑d|n

    f(d) ⇐⇒ f(n) =∑d|n

    µ(d)g(nd

    ).

    11

  • In the notation of the Dirichlet convolution, the inversion formula can be written as g(n) = (f ∗1)(n) ⇐⇒

    f(n) = (µ ∗ g)(n), where 1, as a function, is the constant function in which every integer is mapped to the

    number 1.

    Now, the phi function has a special property such that when a sum is taken over all factors d of the

    argument n, one finds that the value of the sum is n. That is,

    ∑d|n

    φ(d) = n

    Now, suppose that f(n) = n, the identity map. Then one could apply the Möbius inversion formula (or,

    equivalently, the Dirichlet convolution) to see that

    φ(n) =∑d|n

    µ(d)n

    d.

    This gives a relationship between both functions under the convolution.

    5 Chapter 5: Binomial Coefficients

    The binomial coefficients come from combinatorics, a branch of mathematics involving counting. They arise

    in the problem of taking a certain number of objects from a larger set. We define them as follows:(n

    k

    )=

    n!

    k!(n− k)!

    where n! is the factorial of n. The left side is read “n choose k”. By convention, this is defined where

    n ≥ k, even if k is allowed to be negative. Otherwise, if k exceeds n, then the value of the coefficient is zero.

    There are many identities involving the binomial coefficients. What if k were replaced with n− k? Then

    we have: (n

    n− k

    )=

    n!

    (n− k)!(n− (n− k))!=

    n!

    (n− k)!k!=

    (n

    k

    )so the binomial coefficients admit symmetry.

    There is also an identity involving the sum of two binomial coefficients, but requires a bit of thought:(n

    k − 1

    )+

    (n

    k

    )=

    (n+ 1

    k

    )This is Pascal’s identity. The identity says the number of ways to choose k − 1 objects from n plus the

    number of ways to choose k from those same n is equal to the number of ways to select k objects from n+ 1.

    This identity can be expressed in fewer words by referring to Pascal’s triangle, a visual representation of the

    binomial coefficients. When written out, Pascal’s identity says that an entry is equal to the sum of the two

    entries above it.

    There are many more identities involving binomial coefficients; too many to be explained in this paper.

    They will be referenced in problems, and it is left to the reader to prove the truth of these identities.

    12

  • Why are these numbers called binomial coefficients? They arise in the binomial theorem, the expansion

    of binomials to integer powers. The binomial theorem is as follows:

    (x+ y)n =

    n∑j=1

    (n

    j

    )xjyn−j

    For example,

    (x+ y)2 = x2 + 2xy + y2

    (x+ y)3 = x3 + 3x2y + 3xy2 + y3

    (x+ y)4 = x4 + 4x3y + 6x2y2 + 4xy3 + y4

    The coefficients on each term represent a binomial coefficient, or, from a counting perspective, the number

    of ways to arrange x and y, where the exponent on each determines how many of each variable there are.

    Here’s one example of a sum involving binomial coefficients.

    Example.

    Find the sum:

    n∑k=0

    (mk

    )(nk

    )Solution.

    The summand is a quotient of binomial coefficients. To simplify the summand, we use the “trinomial

    revision” identity: (n

    m

    )(m

    k

    )=

    (n

    k

    )(n− km− k

    )This almost matches the form of the summand. Dividing both sides of the identity by

    (nk

    )(nm

    )gives the

    desired form. So, the sum can now be written as

    n∑k=0

    (n−km−k

    )(nm

    ) .In fact, the denominator can be taken outside the summand, since it does not depend on the counter

    k. The indices of summation can be changed to one simple condition, k ≥ 0, since when k exceeds m, the

    binomial coefficient will be zero. We now evaluate the simpler sum

    ∑k≥0

    (n− km− k

    ).

    This summand still needs to be simplified. The next step is to replace k with m− k, and the sum is now

    ∑m−k≥0

    (n− (m− k)m− (m− k)

    )or, equivalently, ∑

    k≤m

    (n−m+ k

    k

    ).

    13

  • The sum is almost evaluated fully. The last trick uses the parallel summation rule:

    ∑k≤n

    (r + k

    k

    )=

    (r + n+ 1

    n

    )So, letting r = n−m, we obtain

    ∑k≤m

    (n−m+ k

    k

    )=

    (n+ 1

    m

    )

    and now we must find

    (n+1m

    )(nm

    ) .(n+1m

    )(nm

    ) = (n+ 1)!m!(n−m+ 1)!

    m!(n−m)!n!

    =n+ 1

    n−m+ 1

    so the desired value for the sum isn+ 1

    n−m+ 1.

    1. What is 114? Why is this number easy to compute, for a person who knows binomial coefficients?

    Solution.

    Observe that 11 = 10+1, so we may expand using the binomial theorem. We see that (10+1)4 expands

    as follows:

    (10 + 1)4 = 104 +

    (4

    1

    )(103) +

    (4

    2

    )(102) +

    (4

    3

    )(10) + 1 = 14641

    This is easy for anybody that knows binomial coefficients since one could expand by the binomial

    theorem instead of multiplying 11 by itself 4 times. Also, observe that the result is the fifth row of

    Pascal’s triangle. One may conjecture that this pattern continues for the sixth row, but it fails, since

    115 = 161051.

    4. Evaluate(−1k

    )by negating (actually un-negating) its upper index.

    Solution.

    By the upper negation identity,

    (−1k

    )= (−1)k

    (k − (−1)− 1

    k

    )(1)

    = (−1)k(k

    k

    )(2)

    = (−1)k. (3)

    (4)

    14

  • But, this is actually incomplete. Note that the binomial coefficients are undefined when the lower index

    is negative. To complete the simplification, we must add the Iversonian bracket for the test condition

    k ≥ 0. So,(−1k

    )= (−1)k[k ≥ 0] .

    30. What hypergeometric series F satisfies

    zF ′(z) + F (z) =1

    1− z?

    Solution.

    We solve this differential equation and translate the solution as a hypergeometric series. Observe that

    the left side of this equation is already in a suitable form to write it as the derivative of the product of two

    functions. Of course, one may divide both sides of the equation by z and observe that the integrating factor

    is the function µ(z) = z. Upon multiplication by z, one is returned to the original equation.

    This equation can then be written as

    (zF (z))′ =1

    1− z.

    Integrating gives

    zF (z) = − ln (1− z)

    from which we see that the solution to the differential equation (ignoring constants of integration) is

    F (z) = − ln (1− z)z

    .

    We must now express this solution as a hypergeometric series. Note that

    ln (1 + z) = z∑k≥0

    (−z)k

    (k + 1).

    So, after replacing z with −z, we have

    − ln (1− z)z

    =∑k≥0

    zk

    (k + 1)

    which, more compactly, is the hypergeometric function F (1, 1; 2; z) .

    15

  • 6 Chapter 6: Special Numbers

    There are particular sequences of numbers that appear frequently in mathematics. For example, the Fibonacci

    numbers {1, 1, 2, 3, 5, 8, 13, . . .} and the harmonic numbers show up in different problems. This section will

    focus on one particular number sequence, the Bernoulli numbers. These numbers will be used in the Euler-

    Maclaurin summation formula, given in Chapter 9.

    The Bernoulli numbers were discovered by Jacob Bernoulli (known in other sources as James or Jacques).

    These numbers occur in formulas used to sum powers of integers. The first five of these sums are shown

    below.

    n∑j=1

    j =1

    2n2 − 1

    2n

    n∑j=1

    j2 =1

    3n3 − 1

    2n2 +

    1

    6n

    n∑j=1

    j3 =1

    4n4 − 1

    2n3 +

    1

    4n2

    n∑j=1

    j4 =1

    5n5 − 1

    2n4 +

    1

    3n3 − 1

    30n

    n∑j=1

    j5 =1

    6n6 − 1

    2n5 +

    5

    12n4 − 1

    12n2

    A pattern emerges in the coefficients in these sums. First, the leading coefficient is a unit fraction whose

    denominator is one more than the leading power of n. Second, the coefficient of nk−1, where k is the degree

    of the polynomial representing the sum, is always − 12 . A series of patterns continues for successive terms. In

    general, when summing mth powers, the form of the sum is:

    Sm(n) =1

    m+ 1

    m∑k=0

    (m+ 1

    k

    )Bkn

    m+1−k,

    where Bk represents the Bernoulli numbers. The sums show that the Bernoulli numbers are multiplied

    by a binomial coefficient, so they are hidden in a simplified form of the sum.

    The Bernoulli numbers can be generated by using their exponential generating function (see Chapter 7):

    z

    ez − 1=∑k≥0

    Bkzk

    k!

    where the coefficients are the Bernoulli numbers. Any specific Bernoulli number can be found by taking

    derivatives of the generating function with respect to z and taking the limit as z tends to 0. In short,

    Bn = limz→0

    dn

    dtn

    (z

    ez − 1

    ).

    An implicit recurrence also defines the Bernoulli numbers:

    m∑j=0

    (m+ 1

    j

    )Bj = [m = 0],

    16

  • where the recurrence is defined for all integers m greater than or equal to zero. The first few Bernoulli

    numbers are listed below.

    n 0 1 2 3 4 5 6 7 8 9 10 11 12

    Bn 1 −1

    2

    1

    60 − 1

    300

    1

    420 − 1

    300

    5

    660 − 691

    2730

    In Chapter 9, the Bernoulli numbers will be used in the Euler-Maclaurin summation formula to give

    estimates for definite summations. What follows are problems involving other special numbers.

    4. Express

    1

    1+

    1

    3+ . . .+

    1

    2n+ 1

    in terms of harmonic numbers.

    Solution.

    This sum of unit fractions includes only those with an odd-numbered denominator. We can easily get

    the desired sum by looking at the sum of the first 2n + 1 unit fractions. This sum is the harmonic number

    H2n+1. If we subtract the terms with even-numbered denominators - that is, subtract the sum

    1

    2+

    1

    4+ . . .+

    1

    2n,

    then we are done. Note, however, that this string of terms simplifies to 12Hn. So, the desired sum is

    H2n+1 −1

    2Hn .

    10. What is the continued fraction representation of φ?

    Solution.

    Note that 1 + 1φ = φ. To see this, clear the fractions and solve for φ, ignoring the negative solution.

    Now, to get the continued fraction expansion, replace φ in the denominator by 1+ 1φ , giving φ implicitly.

    This process continues to infinity, so the desired expansion is

    φ = 1 +1

    1 +1

    1 +1

    . . .

    43. Prove that the infinite sum

    0.1 + 0.01 + 0.002 + 0.0003 + 0.00005 + 0.000008 + 0.0000013 + . . .

    converges to a rational number.

    17

  • Solution.

    Observe that each term contains a Fibonacci number, However, each term is multiplied by a new power

    of ten. We conclude that each term is of the formFn10n

    , where Fn is the nth Fibonacci number. There

    is a generating function for the Fibonacci numbers, namely the function

    G(x) =x

    1− x− x2.

    Now, let x = 110 . Then we must compute the sum∑n≥0

    Fn10n

    which, by the above generating function, sums to 1/1089/100 =89

    10.

    7 Chapter 7: Generating Functions

    Generating functions allow us to view a sequence in a different way. The idea of a generating function stems

    from needing to view a sequence’s terms and possibly giving an interpretation to them.

    To first understand a generating function, one must understand a power series. A power series is a

    polynomial (possibly of infinite degree) whose coefficients are created by some sort of rule. In general, a

    power series looks like ∑j≥0

    ajxj

    where aj is one term from a sequence, say, A.

    Perhaps the most basic power series is the geometric series,∑j≥0

    xj

    which converges to1

    1− xif |x| < 1. All the coefficients on each xj are 1, so we can say that the sequence

    generated by the function1

    1− xis {1, 1, 1, . . .}.

    Of course, there are many more series than this. One can create series for any differentiable function

    (possibly of class C∞) by taking derivatives and dividing by a necessary factorial. This creates a Taylor

    series, whose form is as follows: ∑j≥0

    f (j)(a)

    j!(x− a)j

    where f is differentiable and a is in the domain of f . All the generating functions in the remainder of

    this paper will be centered at a = 0; these are Maclaurin series.

    The following table lists some functions, their power series representations, and the sequence their coef-

    ficients generate.

    18

  • Sequence Generating Function Closed Form

    {1, k, k2, . . .}∑n≥0

    (kz)n1

    1− kz{1,(c1

    ),(c2

    ),(c3

    ), . . .

    } ∑n≥0

    (c

    n

    )zn (1 + z)n{

    1, 1,1

    2,

    1

    6,

    1

    24, . . .

    } ∑n≥0

    zn

    n!ez{

    0, 1,−12,

    1

    3,−1

    4, . . .

    } ∑n≥1

    (−1)n+1zn

    nln (1 + z)

    Other generating functions can be found by variable replacements and elementary operations. For exam-

    ple, the series for ln (1− z) can be created by replacing z with −z, and the geometric series (the first entry

    in the table) is related to the logarithm by termwise differentiation and integration. These basic generating

    functions, along with basic operations, can be used to manipulate a difficult function and express it in terms

    of simpler functions.

    We will solve a recurrence using generating functions. Consider the Fibonacci recurrence:

    F0 = 0;

    F1 = 1;

    Fn = Fn−1 + Fn−2

    The first step is to write the recurrence as one single equation. Iversonian brackets are needed here. So,

    the recurrence can be written as

    Fn = Fn−1 + Fn−2 + [n = 1]

    Next, the equation must be multiplied by xn and summed across all n. Letting∑Fnx

    n = G(x), we have

    G(x) =∑n≥0

    Fn−1xn +

    ∑n≥0

    Fn−2xn + x

    where∑n≥0

    [n = 1]xn = x. Each of the sums almost looks like G(x), but with appropriate manipulations,

    they can be transformed to G(x). The first term must be multiplied and divided by x, and the second must

    be multiplied and divided by x2. Doing so gives the equation

    G(x) = xG(x) + x2G(x) + x

    Rearranging and solving forG(x) gives the solutionG(x) =x

    1− x− x2, so we conclude that the generating

    function for the Fibonacci numbers isx

    1− x− x2.

    Many different recurrences can be solved using the same methods. Sometimes the equation to be solved

    may be a differential equation, while others may be an algebraic equation in G(x).

    3. What is∑n≥0Hn/10

    n ?

    19

  • Solution.

    This sum matches the form of the generating function − ln (1− z)1− z

    , with m = 0 (see equation 7.43).

    So, with z = 1/10, we see the desired sum is10

    9ln

    (10

    9

    ).

    8 Chapter 9: Asymptotics

    Sometimes, in mathematics, an estimate is good enough for an answer. Estimates are used in the approx-

    imation of integrals, derivatives, and sums. There is one formula that is used to approximate the value of

    a sum, since it may be difficult to give an exact answer. The formula of interest is the Euler-Maclaurin

    Formula, stated as follows:

    ∑a≤x

  • We begin as before. Of course, the integral is still easy to compute:∫ 101

    1

    xdx = ln 10

    while the sum still requires a bit of work. Again, with the aid of a computer, and m = 5, the Bernoulli

    sum comes to:5∑k=1

    dk−1

    dxk−1

    (1

    x

    )Bkk!

    ∣∣∣51≈ 0.524

    while the total is ln 10 +209667

    400000≈ 2.827. The true value for this sum (the ninth harmonic number) is

    approximately 2.828, an error of 2.215 · 10−3.

    As these two examples show, the Euler-Maclaurin formula is a powerful tool to approximate sums to a

    certain accuracy. Of course, the sums were estimate with error of about O(x−5), but the results still agreed

    to a tolerable number of decimal places.

    References

    [1] Pete L. Clark. Arithmetical Functions II: Convolution & Inversion. Internet.

    [2] Ronald L. Graham, Donald E. Knuth, and Oren Patashnik. Concrete Mathematics. Addison-Wesley

    Profession, 2nd edition, 1994.

    [3] Victor H. Moll. The Bernoulli Numbers. Internet. Contains generating function for Bernoulli numbers,

    including a way to get each term by differentiation.

    21