The problem description is here, and click here to see all my other Euler solutions in F#.
This is a more difficult version of problem 82, and now you can move in all four directions!
This is a more difficult version of problem 81, but still, as you can’t move left so we can still optimize one column at a time.
After reading the question, a quick search on how to test if a point is in a triangle turned up this useful SO answer. Translating the algorithm to…
I based my solution on Euclid’s formula for generating Pythagorean triples.
Consider the following “magic” 3-gon ring, filled with the numbers 1 to 6, and each line adding to nine.
All square roots are periodic when written as continued fractions and can be written in the form:
For example, let us consider ?23:
If we continue we would get the following…
It is well known that if the square root of a natural number is not an integer, then it is irrational. The decimal expansion of such square roots is infinite without any repeating pattern at all.
Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal numbers are all figurate (polygonal) numbers and are generated by the following formulae:
The ordered set of three 4-digit numbers…
The square root of 2 can be written as an infinite continued fraction.
The infinite continued fraction can be written, ?2 = [1;(2)], (2) indicates that 2 repeats ad infinitum. In a similar way, ?23 =…
Consider the fraction, n/d, where n and d are positive integers. If n < d and HCF(n,d)=1, it is called a reduced proper fraction.
If we list the set of reduced proper fractions for d <= 8 in ascending…