Maths Challenge

[Home]   [Puzzles & Projects]    [Delphi Techniques]   [Math topics]   [Library]   [Utilities]

 

Search

Search WWW

Search DelphiForFun.org

As of October, 2016, Embarcadero is offering a free release of Delphi (Delphi 10.1 Berlin Starter Edition ).     There are a few restrictions, but it is a welcome step toward making more programmers aware of the joys of Delphi.  They do say "Offer may be withdrawn at any time", so don't delay if you want to check it out.  Please use the feedback link to let me know if the link stops working.

 

Support DFF - Shop

 If you shop at Amazon anyway,  consider using this link. We receive a few cents from each purchase.   Thanks.


Support DFF - Donate

 If you benefit from the website,  in terms of knowledge, entertainment value, or something otherwise useful, consider making a donation via PayPal  to help defray the costs.  (No PayPal account necessary to donate via credit card.)  Transaction is secure.

Contact

Feedback:  Send an e-mail with your comments about this program (or anything else).

Search DelphiForFun.org only

 

 

Problem Description

Here are 10 little programs that are the solutions to the first ten even numbered programming challenges in Project Euler at MathsChallenge.net   

bullet

#2.  Find the sum of all the even terms in the Fibonacci sequence below one million. 

bullet

#4.  Find the largest palindrome made from the product of two 3-digit numbers. 

bullet

#6.  What is the difference between the sum of the squares and the square of the sums? 

bullet

#8.  Discover the largest product of five consecutive digits in the 1000-digit number. 

bullet

#10.  Calculate the sum of all the primes below one million. 

bullet

#12.  What is the first triangle number to have over five-hundred factors? 

bullet

#14.  Find the longest sequence using a starting number under one million. 

bullet

#16.  What is the sum of the digits of the number 21000? 

bullet

#18.  What is the maximum sum traveling from the top of the triangle to the base? 

bullet

#20.  Find the sum of digits in 100! 

Background & Techniques

Mathschallenge.net is an educational math site run by British teacher Colin Hughes.   He regularly posts math  Jr. and Sr. level math problems and maintains an archive of past problems.   Of interest to us is his Project Euler - a set of graded programming problems - current 21 problems arranged in 7 set of 3.   It took me a few fun days solving all 21.  Signup is required to participate and scores are posted under the userid you select. (I'm delphiforfun of course).   At least two of the three problems at any level must be solved in order to gain access to the problems at the next level.

Since it would not be fair to post all 21 here, I decided to post the even numbered problems to give viewers the flavor of the competition.    

These are "quick and dirty" programs - the kind you write when obtaining the answer is the primary motivation.  Still there may be some techniques you can use in other places.    I decided not to use any previously posted DF components or units, although the requirement to identify and use prime numbers, palindromes, permutations, and large integer arithmetic requires code which has already been posted  elsewhere on DFF.  Here you'll find the simplest versions of code to for these concepts. 

As usual, have fun!   

Running/Exploring the Program 

bulletDownload source code. 
 

Suggestions for Further Explorations

If you like this kind of thing, for gosh sakes, sign up at ProjectEuler.net and challenge yourself.  If you do sign up, use "delphi" somewhere in your handle so I can see how the "Delphians" are doing. 

 

Modified: February 18, 2016

 

 

 

  [Feedback]   [Newsletters (subscribe/view)] [About me]
Copyright 2000-2017, Gary Darby    All rights reserved.