Magic Square Maker

• This page allows you to choose 4 integers (0 ~ 100,000) and creates a 4x4 magic square with the specified 4 numbers in the top row. ("Magic square" in Wikipedia)

• All numbers are unique unless duplicate(s) / triplicate / quadruplicate are specified for the top row.

• Negative numbers are used only if no solution is available otherwise.

• The numbers in the top row appear with leading 0's if they are entered with leading 0's.

(Useful for a date matrix, e.g., enter 20, 15, 01, 25 for January 25, 2015.)

• Read more at "behind the Magic Square Maker".

20 | 15 | 01 | 25 |

3 | 23 | 29 | 6 |

36 | 5 | 4 | 16 |

2 | 18 | 27 | 14 |

Sum is 61.

20 | 15 | 01 | 25 |

-1 | -25 | -6 | -50 |

75 | 10 | 5 | 2 |

-5 | -2 | -250 | -3 |

Product is 7,500.

Negative numbers are used.

• This program is written in R (r-project.org).

The "brew" package is used to integrate R and HTML.

• Magic square maker | • How many days |

• Pythagorean triples finder | • Prime factorization |

• Bivariate baseball score plots | • 3+3 designs |