Skip to content
Surf Wiki
Save to docs
general/magic-squares

From Surf Wiki (app.surf) — the open knowledge base

Prime reciprocal magic square

Type of magic square


Summary

Type of magic square

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... If you examine the multiples of 1/7, you can see that each is a cyclic permutation of these six digits: \begin{align} 1/7 & = 0.1 4 2 8 5 7\dots \ 2/7 & = 0.2 8 5 7 1 4\dots \ 3/7 & = 0.4 2 8 5 7 1\dots \ 4/7 & = 0.5 7 1 4 2 8\dots \ 5/7 & = 0.7 1 4 2 8 5\dots \ 6/7 & = 0.8 5 7 1 4 2\dots \end{align}

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

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

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 k−th rows in the square are arranged by multiples of 1/p — not necessarily successively — where a magic constant can be obtained.

For instance, an even repeating cycle from an odd, prime reciprocal of p that is divided into n−digit strings creates pairs of complementary sequences of digits that yield strings of nines () when added together:

\begin{align} 1/7 = & \text { } 0.142;857\dots \

  • & \text { } 0.857;142\ldots = 6/7\ & ------------ \ & \text { } 0.999;999\ldots \ \ 1/13 = & \text { } 0.076;923;076;923\dots \
  • & \text { } 0.923;076;923;076\ldots = 12/13\ & ------------ \ & \text { } 0.999;999;999;999\ldots \ \ 1/19 = & \text { } 0.052631578;947368421\dots \
  • & \text { } 0.947368421;052631578\ldots = 18/19\ & ------------ \ & \text { } 0.999999999;999999999\dots \ \end{align}

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

More specifically, a factor n in the numerator of the reciprocal of a prime number p will shift the decimal places of its decimal expansion accordingly,

\begin{align} 1/23 & = 0.04347826;08695652;173913\ldots \ 2/23 & = 0.08695652;17391304;347826\ldots \ 4/23 & = 0.17391304;34782608;695652\ldots \ 8/23 & = 0.34782608;69565217;391304\ldots \ 16/23 & = 0.69565217;39130434;782608\ldots \ \end{align}

In this case, a factor of moves the repeating decimal of 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

PrimeBaseMagic sum
191081
5312286
59229
67233
83241
8919792
2112105
2233222
3075612
38310
3975792
4876
5933592
63187
78713
8113810
11
5
11
19
26
2

Magic squares based on reciprocals of primes p in bases b with periods p - 1 have magic sums equal to,

M = (b-1) \times \frac {p-1}{2}.

Full magic squares

The \bold{\tfrac {1}{19}} 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:

\begin{align} 1/19 & = 0. {\color{red}0} \text { } 5 \text { } 2 \text { } 6 \text { } 3 \text { } 1 \text { } 5 \text { } 7 \text { } 8 \text { } 9 \text { } 4 \text { } 7 \text { } 3 \text { } 6 \text { } 8 \text { } 4 \text { } 2 \text { } {\color{red}1} \dots \ 2/19 & = 0.1 \text { } {\color{red}0} \text { } 5 \text { } 2 \text { } 6 \text { } 3 \text { } 1 \text { } 5 \text { } 7 \text { } 8 \text { } 9 \text { } 4 \text { } 7 \text { } 3 \text { } 6 \text { } 8 \text { } {\color{red}4} \text { } 2 \dots \ 3/19 & = 0.1 \text { } 5 \text { } {\color{red}7} \text { } 8 \text { } 9 \text { } 4 \text { } 7 \text { } 3 \text { } 6 \text { } 8 \text { } 4 \text { } 2 \text { } 1 \text { } 0 \text { } 5 \text { } {\color{red}2} \text { } 6 \text { } 3 \dots \ 4/19 & = 0.2 \text { } 1 \text { } 0 \text { } {\color{red}5} \text { } 2 \text { } 6 \text { } 3 \text { } 1 \text { } 5 \text { } 7 \text { } 8 \text { } 9 \text { } 4 \text { } 7 \text { } {\color{red}3} \text { } 6 \text { } 8 \text { } 4 \dots \ 5/19 & = 0.2 \text { } 6 \text { } 3 \text { } 1 \text { } {\color{red}5} \text { } 7 \text { } 8 \text { } 9 \text { } 4 \text { } 7 \text { } 3 \text { } 6 \text { } 8 \text { } {\color{red}4} \text { } 2 \text { } 1 \text { } 0 \text { } 5 \dots \ 6/19 & = 0.3 \text { } 1 \text { } 5 \text { } 7 \text { } 8 \text { } {\color{red}9} \text { } 4 \text { } 7 \text { } 3 \text { } 6 \text { } 8 \text { } 4 \text { } {\color{red}2} \text { } 1 \text { } 0 \text { } 5 \text { } 2 \text { } 6 \dots \ 7/19 & = 0.3 \text { } 6 \text { } 8 \text { } 4 \text { } 2 \text { } 1 \text { } {\color{red}0} \text { } 5 \text { } 2 \text { } 6 \text { } 3 \text { } {\color{red}1} \text { } 5 \text { } 7 \text { } 8 \text { } 9 \text { } 4 \text { } 7 \dots \ 8/19 & = 0.4 \text { } 2 \text { } 1 \text { } 0 \text { } 5 \text { } 2 \text { } 6 \text { } {\color{red}3} \text { } 1 \text { } 5 \text { } {\color{red}7} \text { } 8 \text { } 9 \text { } 4 \text { } 7 \text { } 3 \text { } 6 \text { } 8 \dots \ 9/19 & = 0.4 \text { } 7 \text { } 3 \text { } 6 \text { } 8 \text { } 4 \text { } 2 \text { } 1 \text { } {\color{red}0} \text { } {\color{red}5} \text { } 2 \text { } 6 \text { } 3 \text { } 1 \text { } 5 \text { } 7 \text { } 8 \text { } 9 \dots \ 10/19 & = 0.5 \text { } 2 \text { } 6 \text { } 3 \text { } 1 \text { } 5 \text { } 7 \text { } 8 \text { } {\color{red}9} \text { } {\color{red}4} \text { } 7 \text { } 3 \text { } 6 \text { } 8 \text { } 4 \text { } 2 \text { } 1 \text { } 0 \dots \ 11/19 & = 0.5 \text { } 7 \text { } 8 \text { } 9 \text { } 4 \text { } 7 \text { } 3 \text { } {\color{red}6} \text { } 8 \text { } 4 \text { } {\color{red}2} \text { } 1 \text { } 0 \text { } 5 \text { } 2 \text { } 6 \text { } 3 \text { } 1 \dots \ 12/19 & = 0.6 \text { } 3 \text { } 1 \text { } 5 \text { } 7 \text { } 8 \text { } {\color{red}9} \text { } 4 \text { } 7 \text { } 3 \text { } 6 \text { } {\color{red}8} \text { } 4 \text { } 2 \text { } 1 \text { } 0 \text { } 5 \text { } 2 \dots \ 13/19 & = 0.6 \text { } 8 \text { } 4 \text { } 2 \text { } 1 \text { } {\color{red}0} \text { } 5 \text { } 2 \text { } 6 \text { } 3 \text { } 1 \text { } 5 \text { } {\color{red}7} \text { } 8 \text { } 9 \text { } 4 \text { } 7 \text { } 3 \dots \ 14/19 & = 0.7 \text { } 3 \text { } 6 \text { } 8 \text { } {\color{red}4} \text { } 2 \text { } 1 \text { } 0 \text { } 5 \text { } 2 \text { } 6 \text { } 3 \text { } 1 \text { } {\color{red}5} \text { } 7 \text { } 8 \text { } 9 \text { } 4 \dots \ 15/19 & = 0.7 \text { } 8 \text { } 9 \text { } {\color{red}4} \text { } 7 \text { } 3 \text { } 6 \text { } 8 \text { } 4 \text { } 2 \text { } 1 \text { } 0 \text { } 5 \text { } 2 \text { } {\color{red}6} \text { } 3 \text { } 1 \text { } 5 \dots \ 16/19 & = 0.8 \text { } 4 \text { } {\color{red}2} \text { } 1 \text { } 0 \text { } 5 \text { } 2 \text { } 6 \text { } 3 \text { } 1 \text { } 5 \text { } 7 \text { } 8 \text { } 9 \text { } 4 \text { } {\color{red}7} \text { } 3 \text { } 6 \dots \ 17/19 & = 0.8 \text { } {\color{red}9} \text { } 4 \text { } 7 \text { } 3 \text { } 6 \text { } 8 \text { } 4 \text { } 2 \text { } 1 \text { } 0 \text { } 5 \text { } 2 \text { } 6 \text { } 3 \text { } 1 \text { } {\color{red}5} \text { } 7 \dots \ 18/19 & = 0.{\color{red}9} \text { } 4 \text { } 7 \text { } 3 \text { } 6 \text { } 8 \text { } 4 \text { } 2 \text { } 1 \text { } 0 \text { } 5 \text { } 2 \text { } 6 \text { } 3 \text { } 1 \text { } 5 \text { } 7 \text { } {\color{red}8} \dots \ \end{align}

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

:"Fourteen primes less than 1000000 possess this required property [in decimal]".

:Solution to problem 2420, "Only 19?" by M. J. Zerger.

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

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 \tfrac {1}{17} 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:

\begin{align} 1/17 & = 0.{\color{blue}0} \text { } 5 ; 8 ; 8 ; 2 ; 3 ; 5 ; 2 ; 9 ; 4 ; 1 ; 1 ; 7 ; 6 ; 4 ; {\color{blue}7} \dots \ 5/17 & = 0.2 ; {\color{blue}9} ; 4 ; 1 ; 1 ; 7 ; 6 ; 4 ; 7 ; 0 ; 5 ; 8 ; 8 ; 2 ; {\color{blue}3} ; 5 \dots \ 8/17 & = 0.4 ; 7 ; {\color{blue}0} ; 5 ; 8 ; 8 ; 2 ; 3 ; 5 ; 2 ; 9 ; 4 ; 1 ; {\color{blue}1} ; 7 ; 6 \dots \ 6/17 & = 0.3 ; 5 ; 2 ; {\color{blue}9} ; 4 ; 1 ; 1 ; 7 ; 6 ; 4 ; 7 ; 0 ; {\color{blue}5} ; 8 ; 8 ; 2 \dots \ 13/17 & = 0.7 ; 6 ; 4 ; 7 ; {\color{blue}0} ; 5 ; 8 ; 8 ; 2 ; 3 ; 5 ; {\color{blue}2} ; 9 ; 4 ; 1 ; 1 \dots \ 14/17 & = 0.8 ; 2 ; 3 ; 5 ; 2 ; {\color{blue}9} ; 4 ; 1 ; 1 ; 7 ; {\color{blue}6} ; 4 ; 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 8 ; 2 ; 3 ; 5 ; 2 ; {\color{blue}9} \dots \ \end{align}

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.

References

References

  1. (1957). "The Enjoyment of Mathematics: Selections from Mathematics for the Amateur.". [[Princeton University Press]].
  2. Leavitt, William G.. (1967). "A Theorem on Repeating Decimals". [[Mathematical Association of America]].
  3. Andrews, William Symes. (1917). "Magic Squares and Cubes". [[Open Court Publishing Company]].
  4. {{Cite OEIS. A021023. Decimal expansion of 1/19.
  5. Subramani, K.. (2020). "On two interesting properties of primes, p, with reciprocals in base 10 having maximum period p – 1.". S.M.A.R.T..
  6. {{Cite OEIS. A007450. Decimal expansion of 1/17.
Wikipedia Source

This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.

Want to explore this topic further?

Ask Mako anything about Prime reciprocal magic square — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report