Complete solution for 4x4 semi-bimagic squares of rationals
by Lee Morgenstern, August 2011.


This will produce all solutions that have no duplicate entries. It will produce some, but not all solutions having duplicate entries, (but we want to avoid those anyway).

Solutions will be translated so that A = 0 and normalized so that F = 1.

Pick rational values for  G, y, z.
Let  
w = GG(y - 2) + G(z + 2) + zz(1 - 2y) + zy(G - 2)
Let  x = (y - 1)[z(2y + 1) - G(y + 2)]
Compute  v = - w / x

Then the other 15 entries are:

D = v + 1
M = z + 1
J = vy
H = z - z / (G - z)
C = J + v / (v - J)
L = C + z(G - J) / [(C - J)(G - z) + z]
Q = G - v + [v(D - G) - J(J - M)] / (v - G - J + M)
B = H + L + Q - C
E = v + L + Q - G
I = G + H - z
K = v + M + Q - G - J
N = C + v - J
P = H + J + L - C - z
F = 1
A = 0

A B C D
E F G H
I J K L
M N P Q


Nice example (reverse-engineered from a known solution).

G = 72
y = 10/11
z = 84

w = (72)(72)(10/11 - 2) + (72)(84 + 2) + (84)(84)(1 - 2(10/11)) + 84(10/11)(72 - 2)
  = 5184(-12/11) + (72)(86) + 7056(-9/11) + 84(10/11)(70)
  = -62208/11 + 6192 - 63504/11 + 58800/11
  = -66912/11 + 6192
  = 1200/11

x = (10/11 - 1)[84(2(10/11) + 1) - 72(10/11 + 2)]
  = (-1/11)[84(31/11) - 72(32/11)]
  = (-1/11)(300/11)
  = -300/121

v = - w / x
  = - (1200/11) / (-300/121)
  = 44

D = 44 + 1
  = 45

M = 84 + 1
  = 85

J = 44(10/11)
  = 40

H = 84 - 84 / (72 - 84)
  = 84 + 84/12
  = 91

C = 40 + 44 / (44 - 40)
  = 40 + 44/4
  = 51

L = 51 + 84(72 - 40) / [(51 - 40)(72 - 84) + 84]
  = 51 + 84(32) / (-48)
  = -5

Q = 72 - 44 + [44(45 - 72) - 40(40 - 85)] / (44 - 72 - 40 + 85)
  = 72 - 44 + [44(-28) - 40(-45)] / 17
  = 72 - 44 + 36
  = 64

B = 91 + (-5) + 64 - 51
  = 99

E = 44 + (-5) + 64 - 72
  = 31

I = 72 + 91 - 84
  = 79

K = 44 + 85 + 64 - 72 - 40
  = 81

N = 51 + 44 - 40
  = 55

P = 91 + 40 + (-5) - 51 - 84
  = -9

F = 1

A = 0

 

  0  99 51  45

 31   1 72  91

 79  40 81  -5

 85  55 -9  64


Return to the home page http://www.multimagie.com