{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "$$\n", "\\def\\CC{\\bf C}\n", "\\def\\QQ{\\bf Q}\n", "\\def\\RR{\\bf R}\n", "\\def\\ZZ{\\bf Z}\n", "\\def\\NN{\\bf N}\n", "$$\n", "# Chapter 6: More advanced exercises\n", "\n", "You will find in this tutorial a collection of more advanced exercises.\n", "You might also want to have a look at the worksheets on \"Collatz\n", "conjecture\", \"Dictionaries and graph theory\" and \"Strings and the\n", "Burrows-Wheeler transform\".\n", "\n", "## Exercise 6.1\n", "\n", "How many strings of length $n$ containing only letters `a` and `b` but\n", "not containing `aa` are there? Compute the value for each $n=1,2,...,10$" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# edit here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Do you know this sequence?" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# edit here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Could you find the corresponding entry in the [OEIS](https://oeis.org/)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# edit here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise 6.2 (Goldbach conjecture)\n", "\n", "Verify experimentally the following statement: \u00ab For each even integer\n", "$n \\geq\n", "4$, there exist two prime number $p \\geq 2$ and $q \\geq 2$ such that\n", "$n = p +\n", "q$ \u00bb." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# edit here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Up to which value of $n$ are you able to verify this conjecture?" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# edit here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise 6.3\n", "\n", "Does there exist two positive integer numbers $x$ and $y$ such that\n", "$x^2 -\n", "61y^2 = 1$ ?" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# edit here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise 6.4\n", "\n", "Write a function that given positive integers $(p,q,n)$ return the\n", "number of solutions in positive integers $(a_1, a_2, \\ldots, a_n)$ to\n", "the equation\n", "\n", "$$\\frac{1}{a_1} + \\frac{1}{a_2} + \\ldots + \\frac{1}{a_n} = \\frac{p}{q}$$\n", "\n", "How many solutions are there for $(p,q,n) = (13, 12, 3)$?" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# edit here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## A sample of Euler problems\n", "\n", "Solve the following Euler problems\n", "\n", "- [problem 26](https://projecteuler.net/problem=26) (decimal\n", " expansions)\n", "- [problem 31](https://projecteuler.net/problem=31) (coin sums)\n", "- [problem 45](https://projecteuler.net/problem=45) (triangular,\n", " pentagonal and hexagonal numbers)\n", "- [problem 46](https://projecteuler.net/problem=46) (odd composite\n", " number that can not be written as the sum of a prime and twice a\n", " square)\n", "- [problem 50](https://projecteuler.net/problem=50) (sum of\n", " consecutive primes that are primes)" ] } ], "metadata": { "kernelspec": { "display_name": "sagemath", "name": "sagemath" } }, "nbformat": 4, "nbformat_minor": 2 }