Solution to Olympiad level counting

In 3Blue1Brown’s latest video Olympiad level counting: How many subsets of {1,…,2000} have a sum divisible by 5?, you can find a few easy exercises at the end. These are the solutions.

Problem 1

ddx[11x]=ddx[n=0xn]1(1x)2=n=0nxn1

Note that the first term of the sum is 0 so,

n=0nxn1=n=1nxn1.

There are infinitely many scenarios you can roll a die before being the number 1.

Loading, please wait
Number of rolls
Scenario
Probability
1Roll 11/6
2Roll 2-6, roll 15/61/6
  
nRoll 2-6 n1 times, roll 1(5/6)n1(1/6)
  

Then the expected value of the number of rolls before seeing 1 is

n=1npn=n=1n(5/6)n1(1/6)=(1/6)n=1n(5/6)n1.

Let x=5/6.

n=1nxn1=1(1x)2=1(15/6)2=11/36=36

Thus the expected number of rolls before seeing 1 is (1/6)36=6.

Problem 2

Using the Binomial Theorem,

(1+x)n=k=0n(nk)xk.

Letting x=2,

k=0n(nk)2k=(1+2)n=3n.

Problem 3

F(x)=n=0fnxnn!F(x)=n=1fnxn1(n1)!F(x)=n=2fnxn2(n2)!

We can reindex the bottom 2 sums by placing n by n+1 and n+2 respectively. F(x)=n=0fn+1xnn!F(x)=n=0fn+2xnn! Thus, F(x)=n=0fn+2xnn!=n=0(fn+1+fn)xnn!=F(x)+F(x).

Bonus

F(x)=F(x)+F(x)F(x)F(x)F(x)=0

The characteristic of the homogeneous second order differential equation is x2x1=0 which has roots

x=b±b24ac2a=1±1+42=1±52

Because there are 2 distinct real roots, the general solution is

F(x)=c1e1+52x+c2e152x.

Since F(0)=0 and F(0)=1,

0=c1+c20=1+52c1+152c2.

Thus,

1=(1+52152)c1=1+51+52c1=252c1c1=15c2=15

Recall that ex=n=0xnn!.

F(x)=15n=0(1+52)nxnn!15n=0(152)nxnn!=n=0(1+52)nxn(152)nxn5n!=n=0(1+52)n(152)n5xnn!=n=0fnxnn!

Hence,

fn=15[(1+52)n(152)n].

Problem 4

Recall from Problem 1 that

11x=n=0xn.

Thus,

f(x)1x=(n=0anxn)(n=0xn)=(a0+a1x+a2x2+)(1+x+x2+)=a0+a0x+a0x2++a1x+a1x2++a2x2+=n=0Snxn

where Sn=k=0nak is the partial sum of the coefficients up to an.




If you found this useful, please cite this as:

Pu, George (May 2022). Solution to Olympiad level counting. https://georgerpu.github.io.

or as a BibTeX entry:

@article{pu2022solution-to-olympiad-level-counting,
  title   = {Solution to Olympiad level counting},
  author  = {Pu, George},
  year    = {2022},
  month   = {May},
  url     = {https://georgerpu.github.io/blog/2022/solutions-to-olympiad/}
}



    Enjoy Reading This Article?

    Here are some more articles you might like to read next:

  • 2024 in Books
  • The Inflection Point of the Exponential Function
  • 2023 in Film
  • Blogging for 4 Years
  • Economic Possibilities for Ourselves