Implementation of various properties presented in a paper by Arthur T. Benjamin and K. Yasuda
1 2 3
The square to be tested
Base of number expansion, defaulting to 10; not relevant for the “sufficient” part of the test
The following tests apply to a general square matrix
m of size
A centrosymmetric square is one in which
is.centrosymmetric() to test
for this (compare an associative square). Note that this
definition extends naturally to hypercubes: a hypercube
A persymmetric square is one in which
is.persymmetric() to test for
A matrix is square palindromic if it satisfies the rather complicated conditions set out by Benjamin and Yasuda (see refs).
These functions return a list of Boolean variables whose value depends
on whether or not
m has the property in question.
give.answers takes the default value of
FALSE, a Boolean value is returned that shows whether the
sufficient conditions are met.
TRUE, a detailed list is
given that shows the status of each individual test, both for the
necessary and sufficient conditions. The value of the second element
necessary) is the status of their Theorem 1 on page 154.
Note that the necessary conditions do not depend on the base
(technically, neither do the sufficient conditions, for being a square
palindrome requires the sums to match for every base
In this implementation, “sufficient” is defined only with
respect to a particular base).
Every associative square is square palindromic, according to Benjamin and Yasuda.
is.square.palindromic() does not yet take a
give.answers argument as does, say,
Robin K. S. Hankin
Arthur T. Benjamin and K. Yasuda. Magic “Squares” Indeed!, American Mathematical Monthly, vol 106(2), pp152-156, Feb 1999
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.