Prime reciprocal magic square

From testwiki
Jump to navigation Jump to search

Template:Short description

A prime reciprocal magic square is a magic square using the decimal digits of the reciprocal of a prime number.

Introduction

Consider a unit fraction, like 1/3 or 1/7. In base ten, the remainder, and so the digits, of 1/3 repeats at once: 0.3333.... However, the remainders of 1/7 repeat over six, or 7−1, digits: 1/7 = 0·142857142857142857... Examining the multiples of 1/7, each is a cyclic permutation of these six digits:1/7=0.142857…2/7=0.285714…3/7=0.428571…4/7=0.571428…5/7=0.714285…6/7=0.857142…

If the digits are laid out as a square, each row and column sums to Template:Math This yields the smallest base-10 non-normal, prime reciprocal magic square:

Template:Val Template:Val Template:Val Template:Val Template:Val Template:Val
Template:Val Template:Val Template:Val Template:Val Template:Val Template:Val
Template:Val Template:Val Template:Val Template:Val Template:Val Template:Val
Template:Val Template:Val Template:Val Template:Val Template:Val Template:Val
Template:Val Template:Val Template:Val Template:Val Template:Val Template:Val
Template:Val Template:Val Template:Val Template:Val Template:Val Template:Val

In contrast with its rows and columns, the diagonals of this square do not sum to Template:Val; however, their mean is Template:Val, as one diagonal adds to Template:Val while the other adds to Template:Val.

All prime reciprocals in any base with a p−1 period will generate magic squares where all rows and columns produce a magic constant, and only a select few will be full, such that their diagonals, rows and columns collectively yield equal sums.

Decimal expansions

In a full, or otherwise prime reciprocal magic square with p−1 period, the even number of Template:Mvar−th rows in the square are arranged by multiples of 1/p — not necessarily consecutively — where a magic constant can be obtained.

For instance, an even repeating cycle from an odd, prime reciprocal of Template:Mvar that is divided into Template:Mvar−digit strings creates pairs of complementary sequences of digits that yield strings of nines (Template:Val) when added together: 1/7= 0.142857…+ 0.857142…=6/7−−−−−−−−−−−− 0.999999…1/13= 0.076923076923…+ 0.923076923076…=12/13−−−−−−−−−−−− 0.999999999999…1/19= 0.052631578947368421…+ 0.947368421052631578…=18/19−−−−−−−−−−−− 0.999999999999999999…

This is a result of Midy's theorem.[1][2] These complementary sequences are generated between multiples of prime reciprocals that add to 1.

More specifically, a factor Template:Mvar in the numerator of the reciprocal of a prime number Template:Mvar will shift the decimal places of its decimal expansion accordingly: 1/23=0.0434782608695652173913…2/23=0.0869565217391304347826…4/23=0.1739130434782608695652…8/23=0.3478260869565217391304…16/23=0.6956521739130434782608…

In this case, a factor of Template:Val moves the repeating decimal of Template:Sfrac by eight places.

A uniform solution of a prime reciprocal magic square, whether full or not, will hold rows with successive multiples of 1/p. Other magic squares can be constructed whose rows do not represent consecutive multiples of 1/p, which nonetheless generate a magic sum.

Magic constant

some prime numbers that generate prime-reciprocal magic squares in given bases
Prime Base Magic sum
19 10 81
53 12 286
59 2 29
67 2 33
83 2 41
89 19 792
211 2 105
223 3 222
307 5 612
383 10 Template:Val
397 5 792
487 6 Template:Val
593 3 592
631 87 Template:Val
787 13 Template:Val
811 3 810
Template:Val 11 Template:Val
Template:Val 5 Template:Val
Template:Val 11 Template:Val
Template:Val 19 Template:Val
Template:Val 26 Template:Val
Template:Val 2 Template:Val

Magic squares based on reciprocals of primes Template:Mvar in bases Template:Mvar with periods p−1 have magic sums equal toTemplate:Cn M=(b−1)×p−12.

Full magic squares

The 119 magic square with maximum period 18 contains a row-and-column total of 81, that is also obtained by both diagonals. This makes it the first full, non-normal base-10 prime reciprocal magic square whose multiples fit inside respective k−th rows:[3][4]

1/19=0.0 5 2 6 3 1 5 7 8 9 4 7 3 6 8 4 2 1…2/19=0.1 0 5 2 6 3 1 5 7 8 9 4 7 3 6 8 4 2…3/19=0.1 5 7 8 9 4 7 3 6 8 4 2 1 0 5 2 6 3…4/19=0.2 1 0 5 2 6 3 1 5 7 8 9 4 7 3 6 8 4…5/19=0.2 6 3 1 5 7 8 9 4 7 3 6 8 4 2 1 0 5…6/19=0.3 1 5 7 8 9 4 7 3 6 8 4 2 1 0 5 2 6…7/19=0.3 6 8 4 2 1 0 5 2 6 3 1 5 7 8 9 4 7…8/19=0.4 2 1 0 5 2 6 3 1 5 7 8 9 4 7 3 6 8…9/19=0.4 7 3 6 8 4 2 1 0 5 2 6 3 1 5 7 8 9…10/19=0.5 2 6 3 1 5 7 8 9 4 7 3 6 8 4 2 1 0…11/19=0.5 7 8 9 4 7 3 6 8 4 2 1 0 5 2 6 3 1…12/19=0.6 3 1 5 7 8 9 4 7 3 6 8 4 2 1 0 5 2…13/19=0.6 8 4 2 1 0 5 2 6 3 1 5 7 8 9 4 7 3…14/19=0.7 3 6 8 4 2 1 0 5 2 6 3 1 5 7 8 9 4…15/19=0.7 8 9 4 7 3 6 8 4 2 1 0 5 2 6 3 1 5…16/19=0.8 4 2 1 0 5 2 6 3 1 5 7 8 9 4 7 3 6…17/19=0.8 9 4 7 3 6 8 4 2 1 0 5 2 6 3 1 5 7…18/19=0.9 4 7 3 6 8 4 2 1 0 5 2 6 3 1 5 7 8…

The first few prime numbers in decimal whose reciprocals can be used to produce a non-normal, full prime reciprocal magic square of this type are[5]

{19, 383, 32327, 34061, 45341, 61967, 65699, 117541, 158771, 405817, ...} Template:OEIS.

The smallest prime number to yield such magic square in binary is 59 (1110112), while in ternary it is 223 (220213); these are listed at A096339, and A096660.

Variations

A 117 prime reciprocal magic square with maximum period of 16 and magic constant of 72 can be constructed where its rows represent non-consecutive multiples of one-seventeenth:[6][7]

1/17=0.0 588235294117647…5/17=0.2941176470588235…8/17=0.4705882352941176…6/17=0.3529411764705882…13/17=0.7647058823529411…14/17=0.8235294117647058…2/17=0.1176470588235294…10/17=0.5882352941176470…16/17=0.9411764705882352…12/17=0.7058823529411764…9/17=0.5294117647058823…11/17=0.6470588235294117…4/17=0.2352941176470588…3/17=0.1764705882352941…15/17=0.8823529411764705…7/17=0.4117647058823529…

As such, this full magic square is the first of its kind in decimal that does not admit a uniform solution where consecutive multiples of 1/p fit in respective k−th rows.

See also

References

Template:Reflist Template:Magic polygons

  1. ↑ Template:Cite book
  2. ↑ Template:Cite journal
  3. ↑ Template:Cite book
  4. ↑ Template:Cite OEIS
  5. ↑ Template:Cite journal
    "Fourteen primes less than 1000000 possess this required property [in decimal]".
    Solution to problem 2420, "Only 19?" by M. J. Zerger.
  6. ↑ Template:Cite journal
  7. ↑ Template:Cite OEIS