Posts

Showing posts from March, 2021

Exploring Project Euler (76 & 187)

Image
 This weeks blog post will be another continuation of my Project Euler series.   As a reference, I've once again included a link to my first post on this topic where I give an overview.   This post will be dealing with two problems that I worked on, specifically problems 76 and 187.  I will give a brief overview of each problem before diving into the concepts they discuss and my methodology for solving them. Below is the first problem I will be discussing, number 76.  Initially, this seems like a large undertaking.  After all, there are nearly one million pandigital numbers, so checking each one for primality would take quite some time.  This is especially true because we would be examining large numbers first, which generally take longer to check for primality.  There are a few ways that the scope of this problem can be drastically narrowed down though.  The first and most important is by simply adding up the digits.  Since all of the pandigital numbers contain the same digits in

Exploring Project Euler (52 & 54)

Image
This weeks blog post will be another continuation of my Project Euler series.   As a reference, I've once again included a link to my first post on this topic where I give an overview.   This post will be dealing with two problems that I worked on, specifically problems 52 and 54.  I will give a brief overview of each problem before diving into the concepts they discuss and my methodology for solving them. Below is the first problem I will be discussing, number 52.  As can be seen from the title of the problem on the Project Euler archive, this question deals with a phenomenon known as pandigital prime numbers.  This is a number which contains all of the integers from 1 to n exactly once where n is a given base and is also prime.  Zero is generally included in these numbers, but this question has specifically requested we start with one.  An example of a pandigital number under this definition would be 123, in the case that n = 3.  This is not, however, a pandigital prime because i

Exploring Project Euler (46 & 51)

Image
I've decided to continue on with the second installment of my Project Euler series in this most recent blog post, with this one conforming more to the structure that can be expected from now on.  As a reference, I've included a link to my first post on this topic where I give an overview.   This post will be dealing with two problems that I worked on, specifically problems 46 and 51.  I will give a brief overview of each problem before diving into the concepts they discuss and my methodology for solving them. Below is the first problem I will be discussing, number 46.   This problem is a bit more complex than others that I have attempted so far.  The above gives two examples that are actually quite useful in solving the problem.  Normally Project Euler problems will opt to show a more elementary version of the problem they would like us to solve.  For example they might show a summation of the numbers one through ten and then request the sum of one to one thousand.  In this ins