{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Project Euler:\n", "\n", " What follows are Python-based solutions to Project Euler problems. In writing the code, I have aimed for a balance between readability and being concise, for which Python is well-suited. Efficiency is only considered if necessary to get reasonable runtime. To check your answers, create an account on Project Euler, where you can submit answers for validation and track your progress." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 10. Summation of primes\n", "#### ([Webpage](https://projecteuler.net/problem=10))
\n", "

The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.

\n", "

Find the sum of all the primes below two million.

\n", "
" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 50. Consecutive prime sum\n", "#### ([Webpage](https://projecteuler.net/problem=50))
\n", "

The prime 41, can be written as the sum of six consecutive primes:

\n", "
41 = 2 + 3 + 5 + 7 + 11 + 13
\n", "

This is the longest sum of consecutive primes that adds to a prime below one-hundred.

\n", "

The longest sum of consecutive primes below one-thousand that adds to a prime, contains 21 terms, and is equal to 953.

\n", "

Which prime, below one-million, can be written as the sum of the most consecutive primes?

\n", "
" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "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.8" } }, "nbformat": 4, "nbformat_minor": 2 }