{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Combinatoric selections (Euler Problem 53)" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "[https://projecteuler.net/problem=53](https://projecteuler.net/problem=53)\n", "\n", "There are exactly ten ways of selecting three from five, 12345:\n", "\n", "$123, 124, 125, 134, 135, 145, 234, 235, 245, 345$\n", "\n", "In combinatorics, we use the notation, 5C3 = 10.\n", "\n", "In general,\n", "\n", "$nCr = \\frac{n!}{r!(n−r)!}$, where r ≤ n, n! = n×(n−1)×...×3×2×1, and 0! = 1.\n", "\n", "It is not until n = 23, that a value exceeds one-million: 23C10 = 1144066.\n", "\n", "How many, not necessarily distinct, values of nCr, for 1 ≤ n ≤ 100, are greater than one-million?" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "completion_date": "", "kernelspec": { "display_name": "Python 3", "language": "python3.6", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.5" }, "tags": [] }, "nbformat": 4, "nbformat_minor": 2 }