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



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.


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

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.

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