Documentation
¶
Overview ¶
The sum of the squares of the first ten natural numbers is,
1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is,
(1 + 2 + ... + 10)^2 = 55^2 = 3025 Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 − 385 = 2640.
Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.
What is the 10 001st prime number?
A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,
a2 + b2 = c2 For example, 32 + 42 = 9 + 16 = 25 = 52.
There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc.
Work out the first ten digits of the sum of the following one-hundred 50-digit numbers ¶
The following iterative sequence is defined for the set of positive integers:
n → n/2 (n is even) n → 3n + 1 (n is odd)
Using the rule above and starting with 13, we generate the following sequence:
13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1 It can be seen that this sequence (starting at 13 and finishing at 1) contains 10 terms. Although it has not been proved yet (Collatz Problem), it is thought that all starting numbers finish at 1.
Which starting number, under one million, produces the longest chain?
NOTE: Once the chain starts the terms are allowed to go above one million.
Problem 15 Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.
━━┓ ━┓ ━┓ ╻ ╻ ╻
┃ ┗━┓ ┃ ┗━━┓ ┗━┓ ┃ ╹ ╹ ┗━ ╹ ┗━━ ┗━━╸
How many such routes are there through a 20×20 grid? A nice explanation: http://code.jasonbhill.com/python/project-euler-problem-15/
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^1000?
execute : go get github.com/divan/num2words
Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n).
If d(a) = b and d(b) = a, where a ≠ b, then a and b are an amicable pair and each of a and b are called amicable numbers.
For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; therefore d(220) = 284. The proper divisors of 284 are 1, 2, 4, 71 and 142; so d(284) = 220.
Evaluate the sum of all the amicable numbers under 10000.
What is the total of all the name scores in the file?
By mathematical analysis, it can be shown that all integers greater than 28123 can be written as the sum of two abundant numbers. However, this upper limit cannot be reduced any further by analysis even though it is known that the greatest number that cannot be expressed as the sum of two abundant numbers is less than this limit. Find the sum of all the positive integers which cannot be written as the sum of two abundant numbers.
What is the millionth lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9?
What is the index of the first term in the Fibonacci sequence to contain 1000 digits?
Find the value of d < 1000 for which 1/d contains the longest recurring cycle in its decimal fraction part. https://en.wikipedia.org/wiki/Repeating_decimal
Find the sum of all the numbers that can be written as the sum of fifth powers of their digits.
What is the largest 1 to 9 pandigital 9-digit number that can be formed as the concatenated product of an integer with (1,2, ... , n) where n > 1?
If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120. {20,48,52}, {24,45,51}, {30,40,50} For which value of p ≤ 1000, is the number of solutions maximised?
d(1) * d(10) * d(100) * d(1000) * d(10000) * d(100000) * d(1000000)
Pandigital prime We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, 2143 is a 4-digit pandigital and is also prime. What is the largest n-digit pandigital prime that exists?
Coded triangle numbers Problem 42 The nth term of the sequence of triangle numbers is given by, tn = ½n(n+1); so the first ten triangle numbers are: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... By converting each letter in a word to a number corresponding to its alphabetical position and adding these values we form a word value. For example, the word value for SKY is 19 + 11 + 25 = 55 = t(10). If the word value is a triangle number then that word is a triangle word. Using words.txt (right click and 'Save Link/Target As...'), a 16K text file containing nearly two-thousand common English words, how many are triangle words?
d2d3d4=406 is divisible by 2 d3d4d5=063 is divisible by 3 d4d5d6=635 is divisible by 5 d5d6d7=357 is divisible by 7 d6d7d8=572 is divisible by 11 d7d8d9=728 is divisible by 13 d8d9d10=289 is divisible by 17 Find the sum of all 0 to 9 pandigital numbers with this property.
Pentagon numbers Pentagonal numbers are generated by the formula, Pn=n(3n−1)/2. The first ten pentagonal numbers are: 1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ... It can be seen that P4 + P7 = 22 + 70 = 92 = P8. However, their difference, 70 − 22 = 48, is not pentagonal. Find the pair of pentagonal numbers, Pj and Pk, for which their sum and difference are pentagonal and D = |Pk − Pj| is minimised; what is the value of D?
Find the next triangle number that is also pentagonal and hexagonal.
Prime digit replacements By replacing the 1st digit of the 2-digit number *3, it turns out that six of the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime. By replacing the 3rd and 4th digits of 56**3 with the same digit, this 5-digit number is the first example having seven primes among the ten generated numbers, yielding the family: 56003, 56113, 56333, 56443, 56663, 56773, and 56993. Consequently 56003, being the first member of this family, is the smallest prime with this property. Find the smallest prime which, by replacing part of the number (not necessarily adjacent digits) with the same digit, is part of an eight prime value family.
Permuted multiples It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order. Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x, contain the same digits.
References: 1: https://en.wikipedia.org/wiki/Pell%27s_equation 2: https://en.wikipedia.org/wiki/Continued_fraction#Square_roots (again) 3: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Continued_fraction_expansion
Source Files
¶
- problem01.go
- problem02.go
- problem03.go
- problem04.go
- problem05.go
- problem06.go
- problem07.go
- problem08.go
- problem09.go
- problem10.go
- problem11.go
- problem12.go
- problem13.go
- problem14.go
- problem15.go
- problem16.go
- problem17.go
- problem18.go
- problem19.go
- problem20.go
- problem21.go
- problem22.go
- problem23.go
- problem24.go
- problem25.go
- problem26.go
- problem27.go
- problem28.go
- problem29.go
- problem30.go
- problem31.go
- problem32.go
- problem33.go
- problem34.go
- problem35.go
- problem36.go
- problem37.go
- problem38.go
- problem39.go
- problem40.go
- problem41.go
- problem42.go
- problem43.go
- problem44.go
- problem45.go
- problem46.go
- problem47.go
- problem48.go
- problem49.go
- problem50.go
- problem51.go
- problem52.go
- problem53.go
- problem54.go
- problem55.go
- problem56.go
- problem57.go
- problem58.go
- problem59.go
- problem60.go
- problem61.go
- problem62.go
- problem63.go
- problem64.go
- problem65.go
- problem66.go
- problem67.go