Project Euler Problem #68

Problem #68 concerns magic 5-gon rings that are very similar to magic squares. The question reads: This is yet another problem that I dreaded solving for years because I thought it would be a pain to implement. Luckily, it’s not too bad with a little brute force. Here’s my solution: Solution #1: Brute Force Approach …

Project Euler Problem #67

Problem #67 is the first instance of a problem that is just a more computationally intensive version of an earlier problem. The question reads: Project Euler Problem 67: Maximum path sum II By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top …

Project Euler Problem #66

Problem #66 concerns the minimal solutions to Pell Equations. The question reads: Project Euler Problem 66: Diophantine equation Consider quadratic Diophantine equations of the form: x2 – Dy2 = 1 For example, when D=13, the minimal solution in x is 6492 – 13×1802 = 1. It can be assumed that there are no solutions in positive integers when D is square. …

Project Euler Problem #65

Problem #65 concerns the infinite continued fraction for e. The question reads: Once again, I apologize for not embedding this problem in WordPress. The problem had a ton of LaTeX this time and I thought it would be easier to just upload a screenshot. Unfortunately, the continued fractions for e cannot be reduced to solving …

Project Euler Problem #64

Problem #64 is another Project Euler problem that concerns infinite continued fractions for irrational numbers. The question reads: I apologize for not embedding the wording of the problem within WordPress. I was a bit lazy this time because the problem was so long. This is a good example of when a coding problem gives too …

Project Euler Problem #63

Problem #63 concerns perfect powers and the number of digits in the perfect power. The question reads: Project Euler Problem 63: Powerful digit counts The 5-digit number, 16807=75, is also a fifth power. Similarly, the 9-digit number, 134217728=89, is a ninth power. How many n-digit positive integers exist which are also an nth power? My solution is …

Project Euler Problem #62

Problem #62 concerns perfect cubes whose digits are rearrangements of each other. The question reads: Project Euler Problem 62: Cubic permutations The cube, 41063625 (3453), can be permuted to produce two other cubes: 56623104 (3843) and 66430125 (4053). In fact, 41063625 is the smallest cube which has exactly three permutations of its digits which are …

Project Euler Problem #61

Problem #61 involves the figurate numbers. The question reads: Project Euler Problem 61: Cyclical figurate numbers Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal numbers are all figurate (polygonal) numbers and are generated by the following formulae: Triangle   P3,n=n(n+1)/2   1, 3, 6, 10, 15, … Square   P4,n=n2   1, 4, 9, 16, 25, …

Project Euler Problem #60

Problem #60 is one of the many Project Euler problems that involves manipulating digits in prime numbers. The question reads: Project Euler Problem 60: Prime pair sets The primes 3, 7, 109, and 673, are quite remarkable. By taking any two primes and concatenating them in any order the result will always be prime. For …

Project Euler Problem #59

Problem #59 concerns a type of cipher in cryptography known as XOR encryption. The question reads: Project Euler Problem 59: XOR decryption Each character on a computer is assigned a unique code and the preferred standard is ASCII (American Standard Code for Information Interchange). For example, uppercase A = 65, asterisk (*) = 42, and …

Design a site like this with WordPress.com
Get started