### 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.

Mensa® Daily Puzzlers

For over 15 years Mensa Page-A-Day calendars have provided several puzzles a year for my programming pleasure.  Coding "solvers" is most fun, but many programs also allow user solving, convenient for "fill in the blanks" type.  Below are Amazon  links to the two most recent years.

(Hint: If you can wait, current year calendars are usually on sale in January.)

### Contact

 Search DelphiForFun.org only

In the X4X2 program, we proved empirically that  X4-X2 is always a multiple of 12.  Here's a slightly more rigorous proof.

1. Factoring out  X2 :   X4-X2=X2(X2-1)

2. Factor X2-1:    X4-X2=X2(X-1)(X+1)

3a. The expression must be divisible by 4: If X is even then X2 is divisible by 4 and the expression is divisible by 4.  If X is odd then (X-1) and (X+1) are even and again the expression is divisible by 4.  Therefore the expression is divisible by 4.

3b.  The expression must be divisible by 3:  The expression has 3 consecutive factors X-1, X, X+1.  Given any 3 consecutive integers, one of the them is divisible by 3.   Proof left as an exercise for the reader.

4. Since the expression is divisible by 3 and by 4 it is divisible by 12.  Q.E.D.