Processing math: 100%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

5.E: Additional Topics (Exercises)

( \newcommand{\kernel}{\mathrm{null}\,}\)
















































































5.1: Generating Functions

1

Find the generating function for each of the following sequences by relating them back to a sequence with known generating function.

  1. 4,4,4,4,4,.
  2. 2,4,6,8,10,.
  3. 0,0,0,2,4,6,8,10,.
  4. 1,5,25,125,.
  5. 1,3,9,27,81,.
  6. 1,0,5,0,25,0,125,0,.
  7. 0,1,0,0,2,0,0,3,0,0,4,0,0,5,.
Answer
  1. 41x.
  2. 2(1x)2.
  3. 2x3(1x2.
  4. 115x.
  5. 11+3x.
  6. 115x2.
  7. x(1x3)2.

2

Find the sequence generated by the following generating functions:

  1. 4x1x.
  2. 114x.
  3. x1+x.
  4. 3x(1+x)2.
  5. 1+x+x2(1x)2 (Hint: multiplication).
Answer
  1. 0,4,4,4,4,4,.
  2. 1,4,16,64,256,.
  3. 0,1,1,1,1,1,1,.
  4. 0,3,6,9,12,15,18,.
  5. 1,3,6,9,12,15,.

3

Show how you can get the generating function for the triangular numbers in three different ways:

  1. Take two derivatives of the generating function for 1,1,1,1,1,
  2. Use differencing.
  3. Multiply two known generating functions.
Answer
  1. The second derivative of 11x is 2(1x)3 which expands to 2+6x+12x2+20x3+30x4+. Dividing by 2 gives the generating function for the triangular numbers.
  2. Compute AxA and you get 1+2x+3x2+4x3+ which can be written as 1(1x)2. Solving for A gives the correct generating function.
  3. The triangular numbers are the sum of the first n numbers 1,2,3,4,. To get the sequence of partial sums, we multiply by 11x. So this gives the correct generating function again.

4

Use differencing to find the generating function for 4,5,7,10,14,19,25,.

Answer

Call the generating function A. Compute AxA=4+x+2x2+3x3+4x4+. Thus AxA=4+x(1x)2. Solving for A gives 41x+x(1x)3.

5

Find a generating function for the sequence with recurrence relation an=3an1an2 with initial terms a0=1 and a1=5.

Answer

1+2x13x+x2.

6

Use the recurrence relation for the Fibonacci numbers to find the generating function for the Fibonacci sequence.

Answer

Compute AxAx2A and the solve for A. The generating function will be x1xx2.

7

Use multiplication to find the generating function for the sequence of partial sums of Fibonacci numbers, S0,S1,S2, where S0=F0, S1=F0+F1, S2=F0+F1+F2, S3=F0+F1+F2+F3 and so on.

Answer

x(1x)(1xx2).

8

Find the generating function for the sequence with closed formula an=2(5n)+7(3)n.

Answer

215x+71+3x.

9

Find a closed formula for the nth term of the sequence with generating function 3x14x+11x.

Answer

an=34n1+1.

10

Find a7 for the sequence with generating function 2(1x)2x1xx2.

Hint

you should “multiply” the two sequences.

Answer

158

11

Explain how we know that 1(1x)2 is the generating function for 1,2,3,4,.

Answer

Starting with 11x=1+x+x2+x3+, we can take derivatives of both sides, given 1(1x)2=1+2x+3x2+. By the definition of generating functions, this says that 1(1x)2 generates the sequence 1, 2, 3…. You can also find this using differencing or by multiplying.

12

Starting with the generating function for 1,2,3,4,, find a generating function for each of the following sequences.

  1. 1,0,2,0,3,0,4,.
  2. 1,2,3,4,5,6,.
  3. 0,3,6,9,12,15,18,.
  4. 0,3,9,18,30,45,63,. (Hint: relate this sequence to the previous one.)
Answer
  1. 1(1x2)2.
  2. 1(1+x)2.
  3. 3x(1x)2.
  4. 3x(1x)3. (partial sums).

13

You may assume that 1,1,2,3,5,8, has generating function 11xx2 (because it does). Use this fact to find the sequence generated by each of the following generating functions.

  1. x21xx2.
  2. 11x2x4.
  3. 113x9x2.
  4. 1(1xx2)(1x).
Answer
  1. 0,0,1,1,2,3,5,8,.
  2. 1,0,1,0,2,0,3,0,5,0,8,0,.
  3. 1,3,18,81,405,.
  4. 1,2,4,7,12,20,.

14

Find the generating function for the sequence 1,2,4,8,16,.

Answer

11+2x.

15

Find the generating function for the sequence 1,1,1,2,3,4,5,6,.

Answer

x3(1x)2+11x.

16

Suppose A is the generating function for the sequence 3,5,9,15,23,33,.

  1. Find a generating function (in terms of A) for the sequence of differences between terms.
  2. Write the sequence of differences between terms and find a generating function for it (without referencing A).
  3. Use your answers to parts (a) and (b) to find the generating function for the original sequence.
Answer
  1. (1x)A=3+2x+4x2+6x3+ which is almost right. We can fix it like this: 2+4x+6x2+=(1x)A3x.
  2. We know 2+4x+6x3+=2(1x)2.
  3. A=2x(1x)3+31x=34x+3x2(1x)3.

5.2: Introduction to Number Theory

1

Suppose a, b, and c are integers. Prove that if ab, then abc.

Answer

Proof

Suppose ab. Then b is a multiple of a, or in other words, b=ak for some k. But then bc=akc, and since kc is an integer, this says bc is a multiple of a. In other words, abc.

2

Suppose a, b, and c are integers. Prove that if ab and ac then ab+c and abc.

Answer

Proof

Assume ab and ac. This means that b and c are both multiples of a, so b=am and c=an for integers m and n. Then b+c=am+an=a(m+n), so b+c is a multiple of a, or equivalently, ab+c. Similarly, bc=aman=a(mn), so bc is a multiple of a, which is to say abc.

3

Write out the remainder classes for n=4.

Answer

{,8,4,0,4,8,12,}, {,7,3,1,5,9,13,},

{,6,2,2,6,10,14,}, and {,5,1,3,7,11,15,}.

4

Let a, b, c, and n be integers. Prove that if ab(modn) and cd(modn), then acbd(modn).

Answer

Proof

Assume ab(modn) and cd(modn). This means a=b+kn and c=d+jn for some integers k and j. Consider ac. We have:

ac=b+kn(d+jn)=bd+(kj)n.

In other words, ac is bd more than some multiple of n, so acbd(modn).

5

Find the remainder of 3456 when divided by

  1. 2.
  2. 5.
  3. 7.
  4. 9.
Answer
  1. 34561456=1(mod2).
  2. 3456=9228(1)228=1(mod5).
  3. 3456=92282228=876176=1(mod7).
  4. 3456=92280228=0(mod9).

6

Determine which of the following congruences have solutions, and find any solutions (between 0 and the modulus) by trial and error.

  1. 4x5(mod6).
  2. 4x5(mod7).
  3. 6x3(mod9).
  4. 6x4(mod9).
  5. x22(mod4).
  6. x22(mod7).
Answer

For all of these, just plug in all integers between 0 and the modulus to see which, if any, work.

  1. No solutions.
  2. x=3.
  3. x=2, x=5, x=8.
  4. No solutions.
  5. No solutions.
  6. x=3.

7

Solve the following congruences (describe the general solution).

  1. 5x+811(mod22).
  2. 6x4(mod10).
  3. 4x24(mod30).
  4. 341x2941(mod9).
Answer
  1. x=5+22k for kZ.
  2. x=4+5k for kZ.
  3. x=6+15k for kZ.
  4. First reduce each number modulo 9, which can be done by adding up the digits of the numbers. Answer: x=2+9k for kZ.

8

I'm thinking of a number. If you multiply my number by 7, add 5, and divide the result by 11, you will be left with a remainder of 2. What remainder would you get if you divided my original number by 11?

Answer

We must solve 7x+52(mod11). This gives x9(mod11). In general, x=9+11k, but when you divide any such x by 11, the remainder will be 9.

9

Solve the following linear Diophantine equations, using modular arithmetic (describe the general solutions).

  1. 6x+10y=32.
  2. 17x+8y=31.
  3. 35x+47y=1.
Answer
  1. Divide through by 2: 3x+5y=16. Convert to a congruence, modulo 3: 5y16(mod3), which reduces to 2y1(mod3). So y2(mod3) or y=2+3k. Plug this back into 3x+5y=16 and solve for x, to get x=25k. So the general solution is x=25k and y=2+3k for kZ.
  2. x=7+8k and y=1117k for kZ.
  3. x=447k and y=3+35k for kZ.

10

You have a 13 oz. bottle and a 20 oz. bottle, with which you wish to measure exactly 2 oz. However, you have a limited supply of water. If any water enters either bottle and then gets dumped out, it is gone forever. What is the least amount of water you can start with and still complete the task?

Answer

First, solve the Diophantine equation 13x+20y=2. The general solution is x=620k and y=4+13k. Now if k=0, this correspond to filling the 20 oz. bottle 4 times, and emptying the 13 oz. bottle 6 times, which would require 80 oz. of water. Increasing k would require considerably more water. Perhaps k=1 would be better? Then we would have x=6+20=14 and y=413=11, which describes the solution where we fill the 13 oz. bottle 14 times, and empty the 20 oz. bottle 11 times. This would require 182 oz. of water. Thus the most efficient procedure is to repeatedly fill the 20 oz bottle, emptying it into the 13 oz bottle, and discarding full 13 oz. bottles, which requires 80 oz. of water.


5.E: Additional Topics (Exercises) is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

  • Was this article helpful?

Support Center

How can we help?