*** Welcome to piglix ***

Prime reciprocal magic square


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

Consider a number divided into one, 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:

If the digits are laid out as a square, it is obvious that each row will sum to 1+4+2+8+5+7, or 27, and only slightly less obvious that each column will also do so, and consequently we have a magic square:

However, neither diagonal sums to 27, but all other prime reciprocals in base ten with maximum period of p-1 produce squares in which all rows and columns sum to the same total.

Other properties of Prime Reciprocals: Midy's theorem

The repeating pattern of an even number of digits [7-1, 11-1, 13-1, 17-1, 19-1, 29-1, ...] in the quotients when broken in half are the nines-complement of each half:

Ekidhikena Purvena From: Bharati Krishna Tirtha's Vedic mathematics#By one more than the one before

Concerning the number of decimal places shifted in the quotient per multiple of 1/19:

A factor of 2 in the numerator produces a shift of one decimal place to the right in the quotient.

[1]

The same phenomenon occurs with other primes in other bases, and the following table lists some of them, giving the prime, base, and magic total (derived from the formula base-1 x prime-1 / 2):

Rademacher, H. and Toeplitz, O. The Enjoyment of Mathematics: Selections from Mathematics for the Amateur. Princeton, NJ: Princeton University Press, pp. 158–160, 1957.

Weisstein, Eric W. "Midy's Theorem." From MathWorld—A Wolfram Web Resource. http://mathworld.wolfram.com/MidysTheorem.html


...
Wikipedia

...