Jump to content

de tantos sistemas para lotomania qual é que da melhor resposta


sorel

Recommended Posts

edcronos, ok vamos em partes, voce cadastra os dois tipos de sorteios , por ordem de sorteio e crescente

no site caixa tem= sempre do ultimo( por vai atualizando)

 voce faz divisoes de 5 por 5 vai dar quadrados de 25 dezenas, depois outros 5 sorteios voce pode criar 40 ou mais quadrantes ou grupos de 25

 objetivo se um deles tem zero nas outras 75 tem 20 é obvio

 esta imagem da direita tem 4 linhas é só fazer de 5  fica ao inves de 20 fica 25

é fazer passar um sorteio para ver se em determinados quadrados de 5 por 5 na fira a direita tem 4 por 5

 fazer 5x5 capichi fazer passar,quando clico num sorteio aparece numa cor

wahjfb.jpg

 

Link to comment
Share on other sites

Guest Zangado

sorel coloca um exemplo manual em uma planilha de como tem que ficar
sobre resultado e organização é facil esse exemplo já tem o ultimo resultado

 

não sei se seria isso,
cara por incrível que possa parecer, a macro que organiza é facil,poderia até adicionar linhas e colunas automaticamente na divisão de sorteios, mas as linhas eu tive que fazer manualmente

qp44fn.jpg
bem fiz uma com 5 sorteios lado a lado

 

 

 

Link to comment
Share on other sites

edcronos a ideia é já que dificilmente indo para atras do ultimo sorteio  ou até mesmo todos dificilmente vai encontro um sorteio com zero, mas assim em grupos de 5 por 5 ( estes dos em ordem de sorteio) deve se melhor por espalha melhor, capichi bom dando zero em 25 em 75 tem 20

Link to comment
Share on other sites

Guest Zangado

continuo sem entender

bem, é melhor deixar de lado

 

kkk, fui tentar fazer a mesma coisa com a quina mas com 50 colunas, até foi , mas qualquer coisa posterior dá memoria insuficiente

Edited by Zangado
Link to comment
Share on other sites

3 horas atrás, sorel disse:

edcronos  pegar as duas formas de de sorteio crescente e ordem de sorteio

 subir do ultimo 5 colunas 5  ou seja se nota que nos 4 quadrantes ( 25 dezenas ou seja uma cruz no volante da caixa) se nota que um dos quadrante carrega menos= 0,2,3 dezenas

 

objetivo de  montar 5 por 5 é encontrar nos sorteio acontecidos  unas 20 a 30 quadrante  basta que um deles de zero ou uma dezena que nas 75 restante tenh 19,20

 ou seja estes quadrado tem ser 5 por 5 =  cada cinco sorteio terá 4 quadrantes de 25

 

Bom dia, sorel e demais forenses

 

Parabéns, sorel e edcronos ! Vocês resolveram a equação.

Link to comment
Share on other sites

Guest Zangado
4 minutos atrás, Arlindo Lotoeasy disse:

Bom dia, sorel e demais forenses

 

Parabéns, sorel e edcronos ! Vocês resolveram a equação.

então me explica que eu estou boiando aqui

Link to comment
Share on other sites

Guest Zangado
Agora, Arlindo Lotoeasy disse:

kkkkkkkkkkkkkkk peça para o sorel, que ele sabe kkkkkkkkkkkkkkkkkk

o problema é que eu não entendo oq o sorel diz
e vc falou que se resolveu a equação, então é pq vc entendeu, oq eu fiz foi organizar os resultados, mas isso eu já tinha feito antes

Link to comment
Share on other sites

22 minutos atrás, edcronos2 disse:

o problema é que eu não entendo oq o sorel diz
e vc falou que se resolveu a equação, então é pq vc entendeu, oq eu fiz foi organizar os resultados, mas isso eu já tinha feito antes

 

Tem MP pra você !

Link to comment
Share on other sites

edcronos é facil ,gente boa!!! vamos por partes pegar o cadastro dos sorteios em ordem de sorteio

 pegar 5 e 5 linhas com 5em colunas cada 5 sorteios  terá 4 grupos de 25 depois mais 5

 entao grupos de 25 vai a vontade ou até chegar no 1º sorteio claro

 entao  se ao menos um tem 0 nas 75 tem 20 é facil. barbada

Link to comment
Share on other sites

Guest Zangado

ainda não entendi, mas eu até gostei da loto mania
vou tentar terminar uma planilha exclusiva que tinha começado e largado de lado
será que essas ferramentas ficam legal?

conferidor
atrasos

par e impar com listagem

repetidas talvez com algo mais

dezenas invertidas com conferencia de igualdade

 

algo mais?

 

 

por enquanto está assim

153sime.jpg

 

 

Edited by Zangado
adicionar
Link to comment
Share on other sites

ok voce consegue as duas opçoes de sorteio = o de sorteio e crescente?!!

edcronos  parece que vai premiar 15 pontos em abril

asim como falei e quadrantes dentro das duas formas de sorteio se poderá ver intervalo  para excluir 25

Link to comment
Share on other sites

conferidor com simulador( objetivo ver a faixa larga do curva do sino )
atrasos de paRES E atrasos de impares e pp ii pi ip

par e impar com listagem

repetidas talvez com algo mais frequencia de repetidas por posiçao funciona melhor no sorteio em ordem de sorteio

dezenas invertidas com conferencia de igualdade quantidade de pares invertidas( capicuas) por sorteios

 

algo mais?

qual linha ( temos 10 linhas matriz caixa) qual coluna ( idem)   é  mais carregada e a mais vazia

 exemplo sorteio teve a linha sete teve nela 5 dezenas e na coluna 4 teve 4 dezenas

 na coluna 2 teve zero dezenas e e linha 8 uma dezena entao ver atrasos das linhas e colunas carregada( a mais  e as nemos carregada com isto posso ter uma estimativa de quais linhas vou usar de 5 a 6 e que vou zero capichi

Link to comment
Share on other sites

Guest Zangado

não está mais aqui quem perguntou

não sei pq mas quando vou lendo tentando entender o pi vira um circulo de confusão na minha mente

melhor deixar isso de lado, eu nem jogo mesmo

Link to comment
Share on other sites

edcrons 2 aqui temos = eu risquei duas diagonais no volante caixa

deu 55 64 65 66 73 74 75 76 77 82 83 84 85 86 87 88 91 92 93 94 95 96 97 98 99
20 29 30 38 39 40 47 48 49 50 56 57 58 59 60 67 68 69 70 78 79 80 89 90 00
02 03 04 05 06 07 08 09 10 13 14 15 16 17 18 19 24 25 26 27 28 35 36 37 46
01 11 12 21 22 23 31 32 33 34 41 42 43 44 45 51 52 53 54 61 62 63 71 72 81

 ao menos uma linha tem 0,1,2,4 em 98% ou seja tem jogar em 4 ediçoes tirando uma quadrante diagonal

 no espelho ou restante as 75 tem no minimo 16 mas voce pode volata a jogar uam 6,7 deste que deixou fora

Link to comment
Share on other sites

Guest Zangado

bem sorel,
eu já tenho muitas planilhas aqui que eu fiz de brincadeira
loto facil, mega, e as múltiplas que trabalha com mais de uma ou até todas as loterias
as macro que eu faço são dinâmicas então, oq tenho para uma loteria serve para as outras

par e impar, repetições, atrasos, ocorrência,conferencia, contagem de dezenas em grupo, ciclo....
e sim já disponibilizei tudo isso

 

como hobby é legal, mas para quem não joga é praticamente perda de tempo

 

até


 

Link to comment
Share on other sites

edcronos 2 aqui temos dos digitos quando cruza qualque linha com coluna sem repetiçao

Re: matriz sem repetição de 50x50 dígitos

Selecione um intervalo de 50 x 50 e matriz de entrar

= RandLatin () - 1

10 x 10 exemplo:
 
Row \ Col
UMA
B
C
D
E
F
G
H
Eu
J
1
4
9
7
2
6
3
1
5
8
2
2
7
3
6
1
5
4
8
9
3
9
6
2
7
1
5
3
8
4
4
3
5
9
8
4
7
2
6
1
5
7
6
5
1
3
8
9
4
2
6
2
1
7
6
3
8
5
4
9
7
5
8
4
9
2
6
7
1
3
8
8
4
2
9
7
1
6
3
5
9
1
3
4
5
8
9
2
7
6
10
6
1
8
3
5
4
9
2
7
Link to comment
Share on other sites

Magic Square

DOWNLOAD Mathematica Notebook EXPLORE THIS TOPIC IN the MathWorld Classroom MagicSquare

A magic square is a square array of numbers consisting of the distinct positive integers 1, 2, ..., n^2 arranged such that the sum of the n numbers in any horizontal, vertical, or main diagonal line is always the same number (Kraitchik 1942, p. 142; Andrews 1960, p. 1; Gardner 1961, p. 130; Madachy 1979, p. 84; Benson and Jacoby 1981, p. 3; Ball and Coxeter 1987, p. 193), known as the magic constant

M_2(n)=1/nsum_(k=1)^(n^2)k=1/2n(n^2+1).

If every number in a magic square is subtracted from n^2+1, another magic square is obtained called the complementary magic square. A square consisting of consecutive numbers starting with 1 is sometimes known as a "normal" magic square.

MagicSquares

The unique normal square of order three was known to the ancient Chinese, who called it the Lo Shu. A version of the order-4 magic square with the numbers 15 and 14 in adjacent middle columns in the bottom row is called Dürer's magic square. Magic squares of order 3 through 8 are shown above.

The magic constant for an nth order general magic square starting with an integer A and with entries in an increasing arithmetic series with difference D between terms is

M_2(n;A,D)=1/2n[2a+D(n^2-1)]

(Hunter and Madachy 1975).

It is an unsolved problem to determine the number of magic squares of an arbitrary order, but the number of distinct magic squares (excluding those obtained by rotation and reflection) of order n=1, 2, ... are 1, 0, 1, 880, 275305224, ... (OEIS A006052; Madachy 1979, p. 87). The 880 squares of order four were enumerated by Frénicle de Bessy in 1693, and are illustrated in Berlekamp et al. (1982, pp. 778-783). The number of 5×5 magic squares was computed by R. Schroeppel in 1973. The number of 6×6 squares is not known, but Pinn and Wieczerkowski (1998) estimated it to be (1.7745+/-0.0016)×10^(19) using Monte Carlo simulation and methods from statistical mechanics. Methods for enumerating magic squares are discussed by Berlekamp et al. (1982) and on the MathPages website.

A square that fails to be magic only because one or both of the main diagonal sums do not equal the magic constant is called a semimagic square. If all diagonals (including those obtained by wrapping around) of a magic square sum to the magic constant, the square is said to be a panmagic square (also called a diabolic square or pandiagonal square). If replacing each number n_i by its square n_i^2 produces another magic square, the square is said to be a bimagic square (or doubly magic square). If a square is magic for n_i, n_i^2, and n_i^3, it is called a trimagic square (or trebly magic square). If all pairs of numbers symmetrically opposite the center sum to n^2+1, the square is said to be an associative magic square.

Squares that are magic under multiplication instead of addition can be constructed and are known as multiplication magic squares. In addition, squares that are magic under both addition and multiplication can be constructed and are known as addition-multiplication magic squares (Hunter and Madachy 1975).

MagicSquareSiamese

Kraitchik (1942) gives general techniques of constructing even and odd squares of order n. For nodd, a very straightforward technique known as the Siamese method can be used, as illustrated above (Kraitchik 1942, pp. 148-149). It begins by placing a 1 in the center square of the top row, then incrementally placing subsequent numbers in the square one unit above and to the right. The counting is wrapped around, so that falling off the top returns on the bottom and falling off the right returns on the left. When a square is encountered that is already filled, the next number is instead placed below the previous one and the method continues as before. The method, also called de la Loubere's method, is purported to have been first reported in the West when de la Loubere returned to France after serving as ambassador to Siam.

A generalization of this method uses an "ordinary vector" (x,y) that gives the offset for each noncolliding move and a "break vector" (u,v) that gives the offset to introduce upon a collision. The standard Siamese method therefore has ordinary vector (1, -1) and break vector (0, 1). In order for this to produce a magic square, each break move must end up on an unfilled cell. Special classes of magic squares can be constructed by considering the absolute sums |u+v|, |(u-x)+(v-y)|, |u-v|, and |(u-x)-(v-y)|=|u+y-x-v|. Call the set of these numbers the sumdiffs (sums and differences). If all sumdiffs are relatively prime to n and the square is a magic square, then the square is also a panmagic square. This theory originated with de la Hire. The following table gives the sumdiffs for particular choices of ordinary and break vectors.

ordinary vector break vector sumdiffs magic squares panmagic squares
(1, -1) (0, 1) (1, 3) 2k+1 none
(1, -1) (0, 2) (0, 2) 6k+/-1 none
(2, 1) (1, -2) (1, 2, 3, 4) 6k+/-1 none
(2, 1) (1, -1) (0, 1, 2, 3) 6k+/-1 6k+/-1
(2, 1) (1, 0) (0, 1, 2) 2k+1 none
(2, 1) (1, 2) (0, 1, 2, 3) 6k+/-1 none

MagicSquareDiamond

A second method for generating magic squares of odd order has been discussed by J. H. Conway under the name of the "lozenge" method. As illustrated above, in this method, the odd numbers are built up along diagonal lines in the shape of a diamond in the central part of the square. The even numbers that were missed are then added sequentially along the continuation of the diagonal obtained by wrapping around the square until the wrapped diagonal reaches its initial point. In the above square, the first diagonal therefore fills in 1, 3, 5, 2, 4, the second diagonal fills in 7, 9, 6, 8, 10, and so on.

MagicSquareDoublyEven

An elegant method for constructing magic squares of doubly even order n=4m is to draw xs through each 4×4 subsquare and fill all squares in sequence. Then replace each entry a_(ij) on a crossed-off diagonal by (n^2+1)-a_(ij) or, equivalently, reverse the order of the crossed-out entries. Thus in the above example for n=8, the crossed-out numbers are originally 1, 4, ..., 61, 64, so entry 1 is replaced with 64, 4 with 61, etc.

MagicSquareLUX

A very elegant method for constructing magic squares of singly even order n=4m+2 with m>=1 (there is no magic square of order 2) is due to J. H. Conway, who calls it the "LUX" method. Create an array consisting of m+1 rows of Ls, 1 row of Us, and m-1 rows of Xs, all of length n/2=2m+1. Interchange the middle U with the L above it. Now generate the magic square of order 2m+1 using the Siamese method centered on the array of letters (starting in the center square of the top row), but fill each set of four squares surrounding a letter sequentially according to the order prescribed by the letter. That order is illustrated on the left side of the above figure, and the completed square is illustrated to the right. The "shapes" of the letters L, U, and X naturally suggest the filling order, hence the name of the algorithm.

Variations on magic squares can also be constructed using letters (either in defining the square or as entries in it), such as the alphamagic square and templar magic square.

MagicSquareNumerology

Link to comment
Share on other sites

pode ser usado na lotofacil e por quadrante da lotomania que é o memso numero de 25

objetivo= quando cruza uma linha( qualquer linha) com qualquer coluna nao temrepetiçao de digitos

 objetivo é procurar dentro das matrizes pontos fracos padroes , pense , vamo lá só eu dando ideias

entao preciso ver quando clico no sorteio aonde passa se deixa rastros( no caso padroes)

Link to comment
Share on other sites

Function RandLatin(Optional bVolatile As Boolean = False) As Long()
  ' shg 2013

  ' UDF only
  ' Requires aiRandLong()

  ' Returns a random Latin square of size n with symbols 1 to n
  ' (by shuffling the symbols, then the rows, then the columns)
  ' to the calling range

  ' e.g., in A1:E5, {=RandLatin()}

  ' All such squares generated in this fashion are members (I think)
  ' of the same isotopy class, so it doesn't generate all possibilities.

  Dim aiInp()       As Long
  Dim aiOut()       As Long
  Dim aiRnd()       As Long
  Dim n             As Long
  Dim i             As Long
  Dim j             As Long

  If bVolatile Then Application.Volatile

  With Application.Caller
    n = IIf(.Rows.Count > .Columns.Count, .Rows.Count, .Columns.Count)
  End With

  ReDim aiInp(1 To n, 1 To n)
  ReDim aiOut(1 To n, 1 To n)

  ' shuffle the symbols
  aiRnd = aiRandLong(1, n)
  For i = 1 To n
    For j = 1 To n
      aiInp(i, j) = aiRnd(((i + j - 2) Mod n) + 1)
    Next j
  Next i

  ' shuffle the rows
  aiRnd = aiRandLong(1, n)
  For i = 1 To n
    For j = 1 To n
      aiOut(i, j) = aiInp(aiRnd(i), j)
    Next j
  Next i

  aiInp = aiOut

  ' shuffle the columns
  aiRnd = aiRandLong(1, n)
  For i = 1 To n
    For j = 1 To n
      aiOut(j, i) = aiInp(j, aiRnd(i))
    Next j
  Next i

  RandLatin = aiOut
End Function

Public Function aiRandLong(iMin As Long, _
                           iMax As Long, _
                           Optional ByVal n As Long = -1, _
                           Optional bVolatile As Boolean = False) As Long()
  ' shg 2008
  ' UDF or VBA

  ' Returns a 1-based array of n unique Longs between iMin and iMax inclusive
  ' Requires FYShuffle

  Dim ai()          As Long     ' array of numbers iMin to iMax
  Dim i             As Long     ' index to ai

  If bVolatile Then Application.Volatile True

  If n < 0 Then n = iMax - iMin + 1
  If iMin > iMax Or n > (iMax - iMin + 1) Or n < 1 Then Exit Function

  ReDim ai(iMin To iMax)

  For i = iMin To iMax
    ai(i) = i
  Next i

  FYShuffle ai
  If n > -1 Then ReDim Preserve ai(iMin To iMin + n - 1)
  aiRandLong = ai
End Function

Sub FYShuffle(av As Variant)
  ' shg 2015
  
  ' In-situ Fisher-Yates shuffle of 1D array av
  ' VBA only

  Dim iLB           As Long
  Dim iTop          As Long
  Dim vTmp          As Variant
  Dim iRnd          As Long

  iLB = LBound(av)
  iTop = UBound(av) - iLB + 1

  Do While iTop
    iRnd = Int(Rnd * iTop)
    iTop = iTop - 1
    vTmp = av(iTop + iLB)
    av(iTop + iLB) = av(iRnd + iLB)
    av(iRnd + iLB) = vTmp
  Loop
End Sub
Link to comment
Share on other sites

pode ser usado na lotoafacil tambem porque tem 25 como no quadrante da lotomnaia

Magic square

From Wikipedia, the free encyclopedia
 

In recreational mathematics, a magic square is an arrangement of distinct numbers (i.e. each number is used once), usually integers, in a square grid, where the numbers in each row, and in each column, and the numbers in the main and secondary diagonals, all add up to the same number. A magic square has the same number of rows as it has columns, and in conventional math notation, "n" stands for the number of rows (and columns) it has. Thus, a magic square always contains n2 numbers, and its size (the number of rows [and columns] it has) is described as being "of order n".[1] A magic square that contains the integers from 1 to n2 is called a normal magic square. (The term "magic square" is also sometimes used to refer to any of various types of word squares.)

Normal magic squares of all sizes except 2 × 2 (that is, where n = 2) can be constructed. The 1 × 1 magic square, with only one cell containing the number 1, is trivial. The smallest (and unique up to rotation and reflection) nontrivial case, 3 × 3, is shown below.

Magicsquareexample.svg

Any magic square can be rotated and reflected to produce 8 trivially distinct squares. In magic square theory all of these are generally deemed equivalent and the eight such squares are said to comprise a single equivalence class.[2]

The constant that is the sum of every row, column and diagonal is called the magic constant or magic sum, M. Every normal magic square has a constant dependent on n, calculated by the formula M = [n(n2 + 1)] / 2. For normal magic squares of order n = 3, 4, 5, 6, 7, and 8, the magic constants are, respectively: 15, 34, 65, 111, 175, and 260 (sequence A006003 in the OEIS).

Magic squares have a long history, dating back to 650 BC in China. At various times they have acquired magical or mythical significance, and have appeared as symbols in works of art. In modern times they have been generalized a number of ways, including using extra or different constraints, multiplying instead of adding cells, using alternate shapes or more than two dimensions, and replacing numbers with shapes and addition with geometric operations.

 

Contents

 

History

220px-Yuan_dynasty_iron_magic_square.jpg
 
Iron plate with an order 6 magic square in Arabic numbers from China, dating to the Yuan Dynasty (1271–1368).

Magic squares were known to Chinese mathematicians as early as 650 BC, and explicitly given since 570 AD,[3] and to Islamic mathematicians possibly as early as the seventh century AD. The first magic squares of order 5 and 6 appear in an encyclopedia from Baghdad circa 983, the Encyclopedia of the Brethren of Purity (Rasa'il Ihkwan al-Safa); simpler magic squares were known to several earlier Arab mathematicians.[3] Some of these squares were later used in conjunction with magic letters, as in Shams Al-ma'arif, to assist Arab illusionists and magicians.[4]

Lo Shu square (3×3 magic square)

Main article: Lo Shu Square

Chinese literature dating from as early as 650 BC tells the legend of Lo Shu (洛書) or "scroll of the river Lo".[3] Early records are ambiguous references to a "river map", but clearly refer to a magic square by 80 AD, and explicitly give one since 570 AD.[3] According to the legend, there was at one time in ancient China a huge flood. While the great king Yu () was trying to channel the water out to sea, a turtle emerged from it with a curious figure / pattern on its shell: a 3×3 grid in which circular dots of numbers were arranged, such that the sum of the numbers in each row, column and diagonal was the same: 15, which is also the number of days in each of the 24 cycles of the Chinese solar year. According to the legend, thereafter people were able to use this pattern in a certain way to control the river and protect themselves from floods.

4 9 2
3 5 7
8 1 6

The Lo Shu Square, as the magic square on the turtle shell is called, is the unique normal magic square of order three in which 1 is at the bottom and 2 is in the upper right corner. Every normal magic square of order three is obtained from the Lo Shu by rotation or reflection.

The Square of Lo Shu is also referred to as the Magic Square of Saturn.

Persia

220px-Magic_square_4x4_Shams_Al-maarif2_
 
Original script from the Shams al-Ma'arif.
220px-Magic_square_4x4_Shams_Al-maarif3_
 
Printed version of the previous manuscript. Eastern Arabic numerals were used.

Although the early history of magic squares in Persia is not known, it has been suggested that they were known in pre-Islamic times.[5] It is clear, however, that the study of magic squares was common in medieval Islam in Persia, and it was thought to have begun after the introduction of chess into the region.[6] The 10th-century Persian mathematician Buzjani, for example, left a manuscript that on page 33 contains a series of magic squares, filled by numbers in arithmetic progression, in such a way that the sums of each row, column and diagonal are equal.[7]

Arabia

Magic squares were known to Islamic mathematicians in Arabia as early as the seventh century. They may have learned about them when the Arabs came into contact with Indian culture and learned Indian astronomy and mathematics – including other aspects of combinatorial mathematics. Alternatively, the idea may have come to them from China. The first magic squares of order 5 and 6 known to have been devised by Arab mathematicians appear in an encyclopedia from Baghdad circa 983, the Rasa'il Ikhwan al-Safa (the Encyclopedia of the Brethren of Purity); simpler magic squares were known to several earlier Arab mathematicians.[3]

The magic square of order three was described as a child-bearing charm[8] since its first literary appearances in the woks of Jābir ibn Hayyān (fl. c. 721– c. 815)[9] and al-Ghazālī (1058–1111)[10] and it was preserved in the tradition of the planetary tables, known from H.C.Agrippa's work,[11] too.

The Arab mathematician Ahmad al-Buni, who worked on magic squares around 1250, attributed mystical properties to them, although no details of these supposed properties are known. There are also references to the use of magic squares in astrological calculations, a practice that seems to have originated with the Arabs.[3]

India

The 3×3 magic square has been a part of rituals in India since Vedic times, and still is today. The Ganesh yantra is a 3×3 magic square. There is a well-known 10th-century 4×4 magic square on display in the Parshvanath Jain temple in Khajuraho, India.[12]

2152085cab.png
 
 

 

7 12 1 14
2 13 8 11
16 3 10 5
9 6 15 4

This is known as the Chautisa Yantra. Each row, column, and diagonal, as well as each 2×2 sub-square, the corners of each 3×3 and 4×4 square, the corners of each 2x4 and 4x2 rectangle, and the offset diagonals (12+8+5+9, 1+11+16+6, 2+12+15+5, 14+2+3+15 and 7+11+10+6, 12+2+5+15, 1+13+16+4) sum to 34.

In this square, every second diagonal number adds to 17 (the same applies to offset diagonals). In addition to squares and rectangles, there are eight trapeziums – two in one direction, and the others at a rotation of 90 degrees, such as (12, 1, 16, 5) and (13, 8, 9, 4).

These characteristics (which identify it as one of the three 4x4 pandiagonal magic squares and as a most-perfect magic square) mean that the rows or columns can be rotated and maintain the same characteristics - for example:

12 1 14 7
13 8 11 2
3 10 5 16
6 15 4 9

The Kubera-Kolam, a magic square of order three, is commonly painted on floors in India. It is essentially the same as the Lo Shu Square, but with 19 added to each number, giving a magic constant of 72.

23 28 21
22 24 26
27 20 25

Europe

215px-Sigillum_Iovis.jpg
 
This page from Athanasius Kircher's Oedipus Aegyptiacus (1653) belongs to a treatise on magic squares and shows the Sigillum Iovis associated with Jupiter

In 1300, building on the work of the Arab Al-Buni, Greek Byzantine scholar Manuel Moschopoulos wrote a mathematical treatise on the subject of magic squares, leaving out the mysticism of his predecessors.[13] Moschopoulos was essentially unknown to the Latin west. He was not, either, the first Westerner to have written on magic squares. They appear in a Spanish manuscript written in the 1280s, presently in the Biblioteca Vaticana (cod. Reg. Lat. 1283a) due to Alfonso X of Castille.[14] In that text, each magic square is assigned to the respective planet, as in the Islamic literature.[15] Magic squares surface again in Italy in the 14th century, and specifically in Florence. In fact, a 6×6 and a 9×9 square are exhibited in a manuscript of the Trattato d'Abbaco (Treatise of the Abacus) by Paolo dell'Abbaco, aka Paolo Dagomari, a mathematician, astronomer and astrologer who was, among other things, in close contact with Jacopo Alighieri, a son of Dante. The squares can be seen on folios 20 and 21 of MS. 2433, at the Biblioteca Universitaria of Bologna. They also appear on folio 69rv of Plimpton 167, a manuscript copy of the Trattato dell'Abbaco from the 15th century in the Library of Columbia University.[16] It is interesting to observe that Paolo Dagomari, like Pacioli after him, refers to the squares as a useful basis for inventing mathematical questions and games, and does not mention any magical use. Incidentally, though, he also refers to them as being respectively the Sun's and the Moon's squares, and mentions that they enter astrological calculations that are not better specified. As said, the same point of view seems to motivate the fellow Florentine Luca Pacioli, who describes 3×3 to 9×9 squares in his work De Viribus Quantitatis.[17] Pacioli states: A lastronomia summamente hanno mostrato li supremi di quella commo Ptolomeo, al bumasar ali, al fragano, Geber et gli altri tutti La forza et virtu de numeri eserli necessaria (Masters of astronomy, such as Ptolemy, Albumasar, Alfraganus, Jabir and all the others, have shown that the force and the virtue of numbers are necessary to that science) and then goes on to describe the seven planetary squares, with no mention of magical applications.

Magic squares of order 3 through 9, assigned to the seven planets, and described as means to attract the influence of planets and their angels (or demons) during magical practices, can be found in several manuscripts all around Europe starting at least since the 15th century. Among the best known, the Liber de Angelis, a magical handbook written around 1440, is included in Cambridge Univ. Lib. MS Dd.xi.45.[18] The text of the Liber de Angelis is very close to that of De septem quadraturis planetarum seu quadrati magici, another handbook of planetary image magic contained in the Codex 793 of the Biblioteka Jagiellońska (Ms BJ 793).[19] The magical operations involve engraving the appropriate square on a plate made with the metal assigned to the corresponding planet,[20] as well as performing a variety of rituals. For instance, the 3×3 square, that belongs to Saturn, has to be inscribed on a lead plate. It will, in particular, help women during a difficult childbirth.

In 1514 Albrecht Dürer immortalizes a 4×4 square in his famous engraving "Melancholia I".

In about 1510 Heinrich Cornelius Agrippa wrote De Occulta Philosophia, drawing on the Hermetic and magical works of Marsilio Ficino and Pico della Mirandola. In its 1531 edition, he expounded on the magical virtues of the seven magical squares of orders 3 to 9, each associated with one of the astrological planets, much in the same way as the older texts did. This book was very influential throughout Europe until the counter-reformation, and Agrippa's magic squares, sometimes called kameas, continue to be used within modern ceremonial magic in much the same way as he first prescribed.[3][21]

Saturn=15
4 9 2
3 5 7
8 1 6
Jupiter=34
4 14 15 1
9 7 6 12
5 11 10 8
16 2 3 13
Mars=65
11 24 7 20 3
4 12 25 8 16
17 5 13 21 9
10 18 1 14 22
23 6 19 2 15
Sol=111
6 32 3 34 35 1
7 11 27 28 8 30
19 14 16 15 23 24
18 20 22 21 17 13
25 29 10 9 26 12
36 5 33 4 2 31
Venus=175
22 47 16 41 10 35 4
5 23 48 17 42 11 29
30 6 24 49 18 36 12
13 31 7 25 43 19 37
38 14 32 1 26 44 20
21 39 8 33 2 27 45
46 15 40 9 34 3 28
Mercury=260
8 58 59 5 4 62 63 1
49 15 14 52 53 11 10 56
41 23 22 44 45 19 18 48
32 34 35 29 28 38 39 25
40 26 27 37 36 30 31 33
17 47 46 20 21 43 42 24
9 55 54 12 13 51 50 16
64 2 3 61 60 6 7 57
Luna=369
37 78 29 70 21 62 13 54 5
6 38 79 30 71 22 63 14 46
47 7 39 80 31 72 23 55 15
16 48 8 40 81 32 64 24 56
57 17 49 9 41 73 33 65 25
26 58 18 50 1 42 74 34 66
67 27 59 10 51 2 43 75 35
36 68 19 60 11 52 3 44 76
77 28 69 20 61 12 53 4 45
220px-Hagiel_sigil_derivation.svg.png
 
The derivation of the sigil of Hagiel, the planetary intelligence of Venus, drawn on the magic square of Venus. Each Hebrew letter provides a numerical value, giving the vertices of the sigil.

The most common use for these kameas is to provide a pattern upon which to construct the sigils of spirits, angels or demons; the letters of the entity's name are converted into numbers, and lines are traced through the pattern that these successive numbers make on the kamea. In a magical context, the term magic square is also applied to a variety of word squares or number squares found in magical grimoires, including some that do not follow any obvious pattern, and even those with differing numbers of rows and columns. They are generally intended for use as talismans. For instance the following squares are: The Sator square, one of the most famous magic squares found in a number of grimoires including the Key of Solomon; a square "to overcome envy", from The Book of Power;[22] and two squares from The Book of the Sacred Magic of Abramelin the Mage, the first to cause the illusion of a superb palace to appear, and the second to be worn on the head of a child during an angelic invocation:

S A T O R
A R E P O
T E N E T
O P E R A
R O T A S
6 66 848 938
8 11 544 839
1 11 383 839
2 73 774 447
H E S E B
E Q A L  
S        
E   G    
B        
A D A M
D A R A
A R A D
M A D A

Albrecht Dürer's magic square

220px-Albrecht_D%C3%BCrer_-_Melencolia_I
 
Detail of Melencolia I

The order-4 magic square in Albrecht Dürer's engraving Melencolia I is believed to be the first seen in European art. It is very similar to Yang Hui's square, which was created in China about 250 years before Dürer's time. The sum 34 can be found in the rows, columns, diagonals, each of the quadrants, the center four squares, and the corner squares (of the 4×4 as well as the four contained 3×3 grids). This sum can also be found in the four outer numbers clockwise from the corners (3+8+14+9) and likewise the four counter-clockwise (the locations of four queens in the two solutions of the 4 queens puzzle[23]), the two sets of four symmetrical numbers (2+8+9+15 and 3+5+12+14), the sum of the middle two entries of the two outer columns and rows (5+9+8+12 and 3+2+15+14), and in four kite or cross shaped quartets (3+5+11+15, 2+10+8+14, 3+9+7+15, and 2+6+12+14). The two numbers in the middle of the bottom row give the date of the engraving: 1514. The numbers 1 and 4 at either side of the date correspond to the letters 'A' and 'D' which are the initials of the artist.

16 3 2 13
5 10 11 8
9 6 7 12
4 15 14 1

Dürer's magic square can also be extended to a magic cube.[24]

Dürer's magic square and his Melencolia I both also played large roles in Dan Brown's 2009 novel, The Lost Symbol.

Sagrada Família magic square

280px-Ms_sf_2.jpg
 
A magic square on the Sagrada Família church façade

The Passion façade of the Sagrada Família church in Barcelona, conceptualized by Antoni Gaudí and designed by sculptor Josep Subirachs, features a 4×4 magic square:

The magic constant of the square is 33, the age of Jesus at the time of the Passion. Structurally, it is very similar to the Melancholia magic square, but it has had the numbers in four of the cells reduced by 1.

1 14 14 4
11 7 6 9
8 10 10 5
13 2 3 15

While having the same pattern of summation, this is not a normal magic square as above, as two numbers (10 and 14) are duplicated and two (12 and 16) are absent, failing the 1→n2 rule.

Similarly to Dürer's magic square, the Sagrada Familia's magic square can also be extended to a magic cube.[25]

330px-Magic_Square_Ramanujan.svg.png
 
This magic square has 24 groups of four fields with the sum of 139 and in the first row - shown at bottom-right - Ramanujan's date of birth.

Srinivasa Ramanujan's magic square

The Indian mathematician Srinivasa Ramanujan created a sqare where - in addition to several groups of four squares - the first row shows his date of birth, Dec. 22nd, 1887.

Types of construction

There are many ways to construct magic squares, but the standard (and most simple) way is to follow certain configurations/formulas which generate regular patterns. Magic squares exist for all values of n, with only one exception: it is impossible to construct a magic square of order 2. Magic squares can be classified into three types: odd, doubly even (n divisible by four) and singly even (n even, but not divisible by four). Odd and doubly even magic squares are easy to generate; the construction of singly even magic squares is more difficult but several methods exist, including the LUX method for magic squares (due to John Horton Conway) and the Strachey method for magic squares.

Group theory was also used for constructing new magic squares of a given order from one of them.[26]

Question dropshade.png Unsolved problem in mathematics:
How many n×n magic squares for n>5?
(more unsolved problems in mathematics)

The numbers of different n×n magic squares for n from 1 to 5, not counting rotations and reflections are: 1, 0, 1, 880, 275305224 (sequence A006052 in OEIS). The number for n = 6 has been estimated to be (1.7745 ± 0.0016) × 1019.[27][28]

Cross-referenced to the above sequence, a new classification enumerates the magic tori that display these magic squares. The numbers of magic tori of order n from 1 to 5, are: 1, 0, 1, 255, 251449712 (sequence A270876 in OEIS).

Method for constructing a magic square of order 3

In the 19th century, Édouard Lucas devised the general formula for order 3 magic squares. Consider the following table made up of positive integers a, b and c:

cb c + (a + b) ca
c − (ab) c c + (ab)
c + a c − (a + b) c + b

These 9 numbers will be distinct positive integers forming a magic square so long as 0 < a < b < ca and b ≠ 2a. Moreover, every 3 x 3 square of distinct positive integers is of this form.

Method for constructing a magic square of odd order

See also: Siamese method
300px-Yanghui_magic_square.GIF
 
Yang Hui's construction method

A method for constructing magic squares of odd order was published by the French diplomat de la Loubère in his book, A new historical relation of the kingdom of Siam (Du Royaume de Siam, 1693), in the chapter entitled The problem of the magical square according to the Indians.[29] The method operates as follows:

The method prescribes starting in the central column of the first row with the number 1. After that, the fundamental movement for filling the squares is diagonally up and right, one step at a time. If a filled square is encountered, one moves vertically down one square instead, then continues as before. When an "up and to the right" move would leave the square, it is wrapped around to the last row or first column, respectively.

step 1
  1  
     
     
step 2
  1  
     
    2
step 3
  1  
3    
    2
step 4
  1  
3    
4   2
step 5
  1  
3 5  
4   2
step 6
  1 6
3 5  
4   2
step 7
  1 6
3 5 7
4   2
step 8
8 1 6
3 5 7
4   2
step 9
8 1 6
3 5 7
4 9 2

Starting from other squares rather than the central column of the first row is possible, but then only the row and column sums will be identical and result in a magic sum, whereas the diagonal sums will differ. The result will thus be a semimagic square and not a true magic square. Moving in directions other than north east can also result in magic squares.

Order 3
8 1 6
3 5 7
4 9 2
Order 5
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
Order 9
47 58 69 80 1 12 23 34 45
57 68 79 9 11 22 33 44 46
67 78 8 10 21 32 43 54 56
77 7 18 20 31 42 53 55 66
6 17 19 30 41 52 63 65 76
16 27 29 40 51 62 64 75 5
26 28 39 50 61 72 74 4 15
36 38 49 60 71 73 3 14 25
37 48 59 70 81 2 13 24 35

The following formulae help construct magic squares of odd order

Order n
Squares (n) Last no. Middle no. Sum (M) Ith row and Jth column no.
n {n^2} \frac{n^2+1}{2} \left(\frac{n^2+1}{2}\right) n n((I+J-1+\left\lfloor\frac{n}{2}\right\rfloor)\,\bmod\,n)+((I+2J-2)\,\bmod\,n)+1

Example:

Order 5
Squares (n) Last no. Middle no. Sum (M)
5 25 13 65

The "middle number" is always in the diagonal bottom left to top right.
The "last number" is always opposite the number 1 in an outside column or row.

A method of constructing a magic square of doubly even order

Doubly even means that n is an even multiple of an even integer; or 4p (e.g. 4, 8, 12), where p is an integer.

Generic pattern All the numbers are written in order from left to right across each row in turn, starting from the top left hand corner. The resulting square is also known as a mystic square. Numbers are then either retained in the same place or interchanged with their diametrically opposite numbers in a certain regular pattern. In the magic square of order four, the numbers in the four central squares and one square at each corner are retained in the same place and the others are interchanged with their diametrically opposite numbers.

A construction of a magic square of order 4 (This is reflection of Albrecht Dürer's square.) Go left to right through the square counting and filling in on the diagonals only. Then continue by going left to right from the top left of the table and fill in counting down from 16 to 1. As shown below.

M = Order 4
1     4
  6 7  
  10 11  
13     16
M = Order 4
1 15 14 4
12 6 7 9
8 10 11 5
13 3 2 16

An extension of the above example for Orders 8 and 12 First generate a "truth" table, where a '1' indicates selecting from the square where the numbers are written in order 1 to n2 (left-to-right, top-to-bottom), and a '0' indicates selecting from the square where the numbers are written in reverse order n2 to 1. For M = 4, the "truth" table is as shown below, (third matrix from left.)

M = Order 4
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
M = Order 4
16 15 14 13
12 11 10 9
8 7 6 5
4 3 2 1
M = Order 4
1 0 0 1
0 1 1 0
0 1 1 0
1 0 0 1
M = Order 4
1 15 14 4
12 6 7 9
8 10 11 5
13 3 2 16

Note that a) there are equal number of '1's and '0's; B) each row and each column are "palindromic"; c) the left- and right-halves are mirror images; and d) the top- and bottom-halves are mirror images (c & d imply b.) The truth table can be denoted as (9, 6, 6, 9) for simplicity (1-nibble per row, 4 rows.) Similarly, for M=8, two choices for the truth table are (A5, 5A, A5, 5A, 5A, A5, 5A, A5) or (99, 66, 66, 99, 99, 66, 66, 99) (2-nibbles per row, 8 rows.) For M=12, the truth table (E07, E07, E07, 1F8, 1F8, 1F8, 1F8, 1F8, 1F8, E07, E07, E07) yields a magic square (3-nibbles per row, 12 rows.) It is possible to count the number of choices one has based on the truth table, taking rotational symmetries into account.

Medjig-method of constructing magic squares of even number of rows

This method is based on a 2006 published mathematical game called medjig (author: Willem Barink, editor: Philos-Spiele). The pieces of the medjig puzzle are squares divided in four quadrants on which the numbers 0, 1, 2 and 3 are dotted in all sequences. There are 18 squares, with each sequence occurring 3 times. The aim of the puzzle is to take 9 squares out of the collection and arrange them in a 3 × 3 "medjig-square" in such a way that each row and column formed by the quadrants sums to 9, along with the two long diagonals.

The medjig method of constructing a magic square of order 6 is as follows:

  • Construct any 3 × 3 medjig-square (ignoring the original game's limit on the number of times that a given sequence is used).
  • Take the 3 × 3 magic square and divide each of its squares into four quadrants.
  • Fill these quadrants with the four numbers from 1 to 36 that equal the original number modulo 9, i.e. x+9y where x is the original number and y is a number from 0 to 3, following the pattern of the medjig-square.

Example:

Order 3
8 1 6
3 5 7
4 9 2
Medjig 3 × 3
2 3 0 2 0 2
1 0 3 1 3 1
3 1 1 2 2 0
0 2 0 3 3 1
3 2 2 0 0 2
0 1 3 1 1 3
Order 6
26 35 1 19 6 24
17 8 28 10 33 15
30 12 14 23 25 7
3 21 5 32 34 16
31 22 27 9 2 20
4 13 36 18 11 29

Similarly, for any larger integer N, a magic square of order 2N can be constructed from any N × N medjig-square with each row, column, and long diagonal summing to 3N, and any N × N magic square (using the four numbers from 1 to 4N2 that equal the original number modulo N2).

Construction of panmagic squares

Any number p in the order-n square can be uniquely written in the form p = an + r, with r chosen from {1,...,n}. Note that due to this restriction, a and r are not the usual quotient and remainder of dividing p by n. Consequently, the problem of constructing can be split in two problems easier to solve. So, construct two matching square grids of order n satisfying panmagic properties, one for the a-numbers (0,..., n−1), and one for the r-numbers (1,...,n). This requires a lot of puzzling, but can be done. When successful, combine them into one panmagic square. Van den Essen and many others supposed this was also the way Benjamin Franklin (1706–1790) constructed his famous Franklin squares. Three panmagic squares are shown below. The first two squares have been constructed April 2007 by Barink, the third one is some years older, and comes from Donald Morris, who used, as he supposes, the Franklin way of construction.

Order 8, sum 260
62 4 13 51 46 20 29 35
5 59 54 12 21 43 38 28
52 14 3 61 36 30 19 45
11 53 60 6 27 37 44 22
64 2 15 49 48 18 31 33
7 57 56 10 23 41 40 26
50 16 1 63 34 32 17 47
9 55 58 8 25 39 42 24
Order 12, sum 870
138 8 17 127 114 32 41 103 90 56 65 79
19 125 140 6 43 101 116 30 67 77 92 54
128 18 7 137 104 42 31 113 80 66 55 89
5 139 126 20 29 115 102 44 53 91 78 68
136 10 15 129 112 34 39 105 88 58 63 81
21 123 142 4 45 99 118 28 69 75 94 52
130 16 9 135 106 40 33 111 82 64 57 87
3 141 124 22 27 117 100 46 51 93 76 70
134 12 13 131 110 36 37 107 86 60 61 83
23 121 144 2 47 97 120 26 71 73 96 50
132 14 11 133 108 38 35 109 84 62 59 85
1 143 122 24 25 119 98 48 49 95 74 72
Order 12, sum 870
1 120 121 48 85 72 73 60 97 24 25 144
142 27 22 99 58 75 70 87 46 123 118 3
11 110 131 38 95 62 83 50 107 14 35 134
136 33 16 105 52 81 64 93 40 129 112 9
8 113 128 41 92 65 80 53 104 17 32 137
138 31 18 103 54 79 66 91 42 127 114 7
5 116 125 44 89 68 77 56 101 20 29 140
139 30 19 102 55 78 67 90 43 126 115 6
12 109 132 37 96 61 84 49 108 13 36 133
135 34 15 106 51 82 63 94 39 130 111 10
2 119 122 47 86 71 74 59 98 23 26 143
141 28 21 100 57 76 69 88 45 124 117 4

The order 8 square satisfies all panmagic properties, including the Franklin ones. It consists of 4 perfectly panmagic 4×4 units. Note that both order 12 squares show the property that any row or column can be divided in three parts having a sum of 290 (= 1/3 of the total sum of a row or column). This property compensates the absence of the more standard panmagic Franklin property that any 1/2 row or column shows the sum of 1/2 of the total. For the rest the order 12 squares differ a lot. The Barink 12×12 square is composed of 9 perfectly panmagic 4×4 units, moreover any 4 consecutive numbers starting on any odd place in a row or column show a sum of 290. The Morris 12×12 square lacks these properties, but on the contrary shows constant Franklin diagonals. For a better understanding of the constructing decompose the squares as described above, and see how it was done. And note the difference between the Barink constructions on the one hand, and the Morris/Franklin construction on the other hand.

In the book Mathematics in the Time-Life Science Library Series, magic squares by Euler and Franklin are shown. Franklin designed this one so that any four-square subset (any four contiguous squares that form a larger square, or any four squares equidistant from the center) total 130. In Euler's square, the rows and columns each total 260, and halfway they total 130 – and a chess knight, making its L-shaped moves on the square, can touch all 64 boxes in consecutive numerical order.

Construction similar to the Kronecker Product

There is a method reminiscent of the Kronecker product of two matrices, that builds an nm × nm magic square from an n × n magic square and an m × m magic square.[30]

The construction of a magic square using genetic algorithms

A magic square can be constructed using genetic algorithms.[31] In this process an initial population of squares with random values is generated. The fitness scores of these individual squares are calculated based on the degree of deviation in the sums of the rows, columns, and diagonals. The population of squares reproduce by exchanging values, together with some random mutations. Those squares with a higher fitness score are more likely to reproduce. The fitness scores of the next generation squares are calculated, and this process continues until a magic square is found or a time limit is reached.

Solving partially completed magic squares

Similar to the Sudoku and KenKen puzzles, solving partially completed has become a popular mathematical puzzle. Puzzle solving centers on analyzing the initial given values and possible values of the empty squares. One or more solution arises as the participant uses logic and permutation group theory to rule out all unsuitable number combinations.

Variations of the magic square

Extra constraints

170px-4x4_magic_square_hierarchy.svg.png
 
Euler diagram of requirements of some types of 4×4 magic squares. Cells of the same colour sum to the magic constant. * In 4×4 most-perfect magic squares, any 2 cells that are 2 cells diagonally apart (including wraparound) sum to half the magic constant, hence any 2 such pairs also sum to the magic constant.

Certain extra restrictions can be imposed on magic squares. If not only the main diagonals but also the broken diagonals sum to the magic constant, the result is a panmagic square.

If raising each number to the nth power yields another magic square, the result is a bimagic (n = 2), a trimagic (n = 3), or, in general, a multimagic square.

A magic square in which the number of letters in the name of each number in the square generates another magic square is called an alphamagic square.

Different constraints

Sometimes the rules for magic squares are relaxed, so that only the rows and columns but not necessarily the diagonals sum to the magic constant (this is usually called a semimagic square).

In heterosquares and antimagic squares, the 2n + 2 sums must all be different.

Multiplicative magic squares

Instead of adding the numbers in each row, column and diagonal, one can apply some other operation. For example, a multiplicative magic square has a constant product of numbers. A multiplicative magic square can be derived from an additive magic square by raising 2 (or any other integer) to the power of each element, because the logarithm of the product of 2 numbers is the sum of logarithm of each. Alternatively, if any 3 numbers in a line are 2a, 2b and 2c, their product is 2a+b+c, which is constant if a+b+c is constant, as they would be if a, b and c were taken from ordinary (additive) magic square.[32] For example, the original Lo-Shu magic square becomes:

M = 32768
16 512 4
8 32 128
256 2 64

Other examples of multiplicative magic squares include:

M = 216
2 9 12
36 6 1
3 4 18
M = 6720
1 6 20 56
40 28 2 3
14 5 24 4
12 8 7 10
M = 6,227,020,800
27 50 66 84 13 2 32
24 52 3 40 54 70 11
56 9 20 44 36 65 6
55 72 91 1 16 36 30
4 24 45 60 77 12 26
10 22 48 39 5 48 63
78 7 8 18 40 33 60

Multiplicative magic squares of complex numbers

Still using Ali Skalli's non iterative method, it is possible to produce an infinity of multiplicative magic squares of complex numbers[33] belonging to \mathbb C set. On the example below, the real and imaginary parts are integer numbers, but they can also belong to the entire set of real numbers \mathbb R. The product is: −352,507,340,640 − 400,599,719,520 i.

Skalli multiplicative 7 × 7 of complex numbers
21+14i −70+30i −93−9i −105−217i 16+50i 4−14i 14−8i
63−35i 28+114i −14i 2+6i 3−11i 211+357i −123−87i
31−15i 13−13i −103+69i −261−213i 49−49i −46+2i −6+2i
102−84i −28−14i 43+247i −10−2i 5+9i 31−27i −77+91i
−22−6i 7+7i 8+14i 50+20i −525−492i −28−42i −73+17i
54+68i 138−165i −56−98i −63+35i 4−8i 2−4i 70−53i
24+22i −46−16i 6−4i 17+20i 110+160i 84−189i 42−14i

Additive-multiplicative magic and semimagic squares

Additive-multiplicative magic squares and semimagic squares satisfy properties of both ordinary and multiplicative magic squares and semimagic squares, respectively.[34]

First known additive-multiplicative magic square
8×8 found by W. W. Horner in 1955
Sum = 840
Product = 2 058 068 231 856 000

162 207 51 26 133 120 116 25
105 152 100 29 138 243 39 34
92 27 91 136 45 38 150 261
57 30 174 225 108 23 119 104
58 75 171 90 17 52 216 161
13 68 184 189 50 87 135 114
200 203 15 76 117 102 46 81
153 78 54 69 232 175 19 60

Smallest known additive-multiplicative semimagic square
4×4 found by L. Morgenstern in 2007
Sum = 247
Product = 3 369 600

156 18 48 25
30 144 60 13
16 20 130 81
45 65 9 128

It is unknown if any additive-multiplicative magic squares smaller than 8×8 exist, but it has been proven that no 3×3 or 4×4 additive-multiplicative magic squares and no 3×3 additive-multiplicative semimagic squares exist.[35]

Other magic shapes

Other shapes than squares can be considered. The general case is to consider a design with N parts to be magic if the N parts are labeled with the numbers 1 through N and a number of identical sub-designs give the same sum. Examples include magic dodecahedrons, magic triangles[36]magic stars, and magic hexagons. Going up in dimension results in magic cubes and other magic hypercubes.

Edward Shineman has developed yet another design in the shape of magic diamonds.

Possible magic shapes are constrained by the number of equal-sized, equal-sum subsets of the chosen set of labels. For example, if one proposes to form a magic shape labeling the parts with {1, 2, 3, 4}, the sub-designs will have to be labeled with {1,4} and {2,3}.[36]

Other component elements

160px-Geomagic_square_-_Diamonds.jpg
 
A geometric magic square.

Magic squares may be constructed which contain geometric shapes instead of numbers. Such squares, known as geometric magic squares, were invented and named by Lee Sallows in 2001.[37]

Combined extensions

One can combine two or more of the above extensions, resulting in such objects as multiplicative multimagic hypercubes. Little seems to be known about this subject.

Related problems

Over the years, many mathematicians, including Euler, Cayley and Benjamin Franklin have worked on magic squares, and discovered fascinating relations.

Magic square of primes

Rudolf Ondrejka (1928–2001) discovered the following 3×3 magic square of primes, in this case nine Chen primes:

17 89 71
113 59 5
47 29 101

The Green–Tao theorem implies that there are arbitrarily large magic squares consisting of primes.

n-Queens problem

In 1992, Demirörs, Rafraf, and Tanik published a method for converting some magic squares into n-queens solutions, and vice versa.[38]

Enumeration of magic squares

220px-Journal.pone.0125062.g001.PNG
 
Semi-log plot of Pn, the probability of magic squares of dimension n

As mentioned above, the set of normal squares of order three constitutes a single equivalence class-all equivalent to the Lo Shu square. Thus there is basically just one normal magic square of order 3. But the number of distinct normal magic squares rapidly increases for higher orders.[39] There are 880 distinct magic squares of order 4 and 275,305,224 of order 5.[40] These squares are respectively displayed on 255 magic tori of order 4, and 251,449,712 of order 5.[41] The number of magic tori and distinct normal squares is not yet known for any higher order.[42]

Algorithms tend to only generate magic squares of a certain type or classification, making counting all possible magic squares quite difficult. Traditional counting methods have proven unsuccessful, statistical analysis using the Monte Carlo method has been applied. The basic principle applied to magic squares is to randomly generate n × n matrices of elements 1 to n2 and check if the result is a magic square. The probability that a randomly generated matrix of numbers is a magic square is directly proportional to the number of magic squares.[43]

More intricate versions of the Monte Carlo method, such as the exchange Monte Carlo, and Monte Carlo Backtracking have produced even more accurate estimations. Using these methods it has been shown that the probability of magic squares decreases rapidly as n increases. Using fitting functions give the curves seen to the right.

Magic squares in popular culture

400px-Macau_stamps_featuring_9_magic_squ
 
Macau stamps featuring magic squares

On October 9, 2014 the post office of Macao in the People's Republic of China issued a series of stamps based on magic squares.[44] The figure below shows the stamps featuring the nine magic squares chosen to be in this collection.[45]

See also

Notes

  1.  

References

38px-Wikisource-logo.svg.png Wikisource has the text of the 1911 Encyclopædia Britannica article Magic Square.

Further reading

  • Block, Seymour (2009). Before Sudoku: The World of Magic Squares. Oxford University Press. ISBN 0195367901.
Link to comment
Share on other sites

edcronos consegui!!50x50 poe ela numa planilia e ver aonde passa para ver linha e ou quadrante ou diagoniais vazias

18 20 34 50 23 32 35 46 17 2 41 8 14 12 49 45 15 4 9 26 44 5 48 24 39 16 6 27 19 31 29 42 7 28 10 47 11 25 36 40 43 33 3 13 37 22 38 21 30 1
49 11 21 4 20 16 26 25 8 9 1 22 34 39 29 33 3 46 47 30 42 15 14 32 24 28 36 45 48 13 43 19 27 10 17 38 35 6 31 18 44 50 40 2 12 5 23 41 37 7
31 43 35 16 29 1 42 10 33 3 30 50 11 34 13 24 25 28 40 19 47 46 20 41 21 7 8 39 23 5 2 38 12 27 45 18 44 17 22 36 9 32 6 15 14 4 49 26 48 37
24 4 15 42 50 47 25 48 11 7 40 35 5 13 32 43 37 19 27 6 10 30 22 9 2 38 34 29 8 41 16 17 49 23 20 45 46 14 21 39 28 44 12 1 31 26 33 3 36 18
32 46 3 19 4 38 6 14 35 27 18 26 15 2 16 44 12 48 45 36 17 37 5 47 9 23 21 43 22 1 28 8 29 20 11 33 25 34 41 24 10 42 39 7 13 30 50 40 31 49
33 5 2 26 22 42 3 37 34 28 47 21 13 29 50 11 7 30 10 40 25 1 31 44 43 19 39 20 36 32 4 6 23 48 14 17 15 12 24 45 46 35 27 16 49 41 8 9 18 38
10 36 49 34 6 11 13 41 37 50 43 12 18 38 17 48 32 21 4 2 5 24 40 20 23 35 7 19 3 45 8 15 42 26 30 46 31 1 27 28 22 14 16 33 47 39 25 29 9 44
9 19 37 17 42 45 14 22 46 49 39 25 30 1 47 28 31 8 29 34 20 36 26 27 7 33 15 16 35 40 38 11 32 50 4 43 48 5 3 2 23 10 13 18 41 6 44 12 21 24
39 50 5 44 33 9 46 19 20 1 3 11 22 31 24 29 30 42 7 25 28 26 8 2 13 47 14 49 17 21 32 10 18 38 23 27 4 48 34 12 16 43 37 41 36 35 45 15 6 40
30 27 17 49 7 31 33 43 47 34 22 38 10 25 37 40 11 29 21 50 24 20 28 36 6 13 42 3 16 48 12 32 15 2 9 41 45 44 19 26 39 18 35 14 46 23 1 8 4 5
2 42 30 10 44 27 48 8 4 18 12 46 26 41 9 16 36 17 49 14 23 6 35 7 1 45 5 32 11 3 47 20 24 33 50 29 19 22 15 13 38 28 31 40 21 25 43 37 34 39
47 48 12 8 19 33 34 5 25 29 24 6 37 7 38 10 13 22 43 21 11 31 30 45 27 50 3 28 26 18 23 35 16 4 46 44 14 15 40 9 20 17 2 49 1 36 42 39 41 32
20 21 32 15 34 46 1 40 31 42 28 13 24 33 11 22 47 3 19 7 30 9 39 4 50 25 49 8 12 43 35 37 17 6 36 48 41 18 29 23 26 5 38 44 45 2 14 16 27 10
50 15 9 30 5 19 40 12 21 10 38 41 2 43 4 35 27 37 17 18 6 7 13 42 44 48 24 11 31 16 46 36 20 14 34 8 3 39 32 33 25 26 45 28 29 1 22 47 49 23
36 29 11 32 49 41 44 28 45 15 26 33 20 14 31 39 46 16 3 42 9 4 23 21 34 1 17 12 38 22 13 47 37 7 27 40 43 10 8 6 2 24 25 5 48 50 18 35 19 30
22 2 44 1 13 30 47 27 24 25 19 32 43 11 5 21 10 7 6 38 40 28 29 26 35 37 33 34 49 4 15 18 14 12 39 36 9 45 50 8 3 41 17 46 20 16 31 42 23 48
35 1 28 40 41 6 27 49 2 48 17 9 16 4 26 15 23 18 14 45 12 38 32 25 46 36 43 5 24 42 30 39 22 31 13 34 7 29 44 11 37 3 20 19 50 47 21 10 33 8
6 49 20 24 18 21 43 16 27 5 35 45 23 48 36 12 4 32 15 44 2 50 38 34 14 41 10 37 47 8 31 9 30 1 7 3 29 28 17 25 13 39 46 22 19 33 40 11 42 26
19 12 45 31 37 22 24 2 40 11 50 18 27 10 48 6 43 13 35 32 21 29 7 8 17 5 47 25 1 23 14 41 46 15 3 26 39 9 38 42 34 36 44 20 28 49 30 33 16 4
13 44 26 28 43 7 19 17 50 40 37 4 35 21 2 32 6 10 18 48 38 25 11 1 41 27 22 24 20 15 9 23 39 45 33 49 42 8 5 31 47 16 36 3 34 46 29 30 14 12
48 39 33 13 12 5 32 9 18 35 4 49 45 17 14 36 44 2 26 16 41 43 27 22 8 15 38 6 7 20 34 1 25 3 40 30 24 47 23 19 21 31 42 11 10 29 37 50 28 46
46 40 38 12 3 14 49 24 1 8 20 7 47 42 25 30 33 39 22 29 31 45 9 48 19 34 16 26 2 10 6 13 35 21 41 5 18 32 28 4 36 37 50 17 44 27 15 23 43 11
29 35 41 46 11 28 30 6 22 47 7 5 21 24 43 50 40 25 38 37 19 3 34 16 32 10 31 33 14 2 44 48 45 17 8 23 26 36 13 49 42 4 18 9 39 15 20 1 12 27
8 13 43 41 31 26 9 7 39 46 42 24 29 20 22 34 28 1 25 47 3 16 49 35 11 30 45 14 18 50 5 40 48 37 12 6 2 27 33 17 15 21 10 4 23 32 36 44 38 19
16 25 40 48 46 23 36 34 26 45 49 30 3 9 28 42 39 14 33 31 8 12 15 38 47 20 41 44 5 7 10 22 43 11 35 50 6 21 1 32 17 19 24 27 2 37 4 18 13 29
43 26 1 25 35 10 37 36 5 38 27 15 41 32 44 4 18 6 23 12 48 40 21 28 16 17 13 50 34 9 42 14 33 8 22 20 30 31 2 29 19 46 49 47 24 3 11 7 39 45
26 7 10 18 1 36 45 29 9 14 8 47 28 46 30 3 20 49 34 33 39 23 16 6 25 31 44 15 32 19 37 24 5 13 2 21 27 43 42 35 12 40 11 48 4 38 41 17 50 22
42 37 27 36 30 8 39 13 3 20 33 40 7 28 19 25 29 31 11 24 34 49 1 17 10 22 9 46 41 38 48 21 4 5 15 35 12 2 47 44 14 6 43 23 16 18 26 45 32 50
41 28 25 38 16 18 17 20 44 12 36 42 46 15 1 9 14 23 39 8 45 48 4 40 3 49 35 2 50 30 7 33 13 29 43 24 10 11 26 21 27 47 34 37 5 19 32 6 22 31
12 33 22 43 45 2 4 42 23 41 15 20 8 36 39 49 26 44 1 46 16 35 17 13 31 9 48 18 10 34 24 28 40 47 38 7 50 19 14 37 32 29 30 21 6 11 27 5 25 3
37 45 8 29 27 13 50 44 38 21 5 23 17 6 12 18 35 43 41 4 32 11 10 31 36 2 19 40 28 14 39 16 3 9 47 1 33 42 48 30 24 49 26 34 25 20 7 22 46 15
38 14 39 22 48 50 21 15 6 43 32 36 12 27 23 17 2 5 44 41 35 13 37 33 45 4 40 10 30 49 20 26 28 46 25 42 34 3 18 47 11 8 9 29 7 31 19 24 1 16
14 24 50 2 39 15 16 47 49 26 46 29 33 8 34 31 42 9 30 28 1 44 45 5 22 3 23 36 27 11 21 7 6 40 18 37 32 38 20 48 41 13 19 35 17 43 12 4 10 25
45 22 13 35 8 44 15 30 14 16 9 34 31 49 33 20 1 26 28 3 46 41 36 43 29 42 12 23 6 24 50 25 38 19 48 10 5 37 39 27 4 11 7 32 18 21 17 2 40 47
27 8 31 11 17 43 5 26 48 32 2 14 36 18 45 23 41 35 16 15 4 21 6 29 49 44 37 38 25 39 33 46 47 42 19 28 22 30 12 7 50 20 1 24 40 34 10 13 3 9
5 9 42 7 2 37 38 45 32 6 48 16 44 35 15 41 17 27 36 23 18 10 43 30 26 12 50 21 29 46 3 49 34 39 24 31 47 33 4 22 40 1 8 25 11 28 13 19 20 14
7 17 36 20 10 29 22 35 19 24 13 48 6 40 27 38 21 11 32 5 50 34 25 49 18 43 30 47 46 12 45 4 9 44 42 16 8 26 37 1 33 23 41 39 3 14 28 31 15 2
44 30 7 6 26 17 12 31 15 23 45 3 1 16 42 46 49 36 20 39 14 18 41 10 28 8 2 4 21 47 19 34 50 22 5 11 37 13 9 43 48 25 29 38 32 40 35 27 24 33
17 31 29 21 36 35 2 1 12 4 44 39 49 23 8 14 16 41 46 9 15 32 18 11 20 26 27 48 40 33 22 3 19 30 37 25 13 7 45 10 5 34 28 50 38 24 6 43 47 42
1 10 6 23 28 49 8 11 42 39 31 19 25 3 7 47 34 20 24 22 33 14 46 18 40 29 26 9 4 37 27 50 2 43 44 32 17 35 30 41 45 38 21 12 15 48 16 36 5 13
3 38 48 45 47 39 20 50 28 31 34 10 19 30 40 7 22 33 13 11 29 8 42 12 37 24 46 1 44 6 18 43 41 32 16 2 23 4 25 15 49 27 5 36 26 17 9 14 35 21
15 47 19 27 9 12 23 33 16 36 14 28 42 26 3 1 8 45 31 20 49 17 44 37 30 39 4 41 43 25 40 29 21 24 32 13 38 50 46 5 18 7 22 6 35 10 2 48 11 34
40 23 14 33 38 24 11 4 10 13 21 17 48 37 18 27 5 50 2 35 43 22 19 39 12 32 25 7 42 36 49 44 1 16 28 9 20 46 6 3 29 45 15 31 30 8 47 34 26 41
11 41 16 3 21 25 7 18 13 19 10 2 32 50 35 5 38 40 48 27 37 47 24 46 4 6 29 22 39 44 26 12 8 36 31 14 1 49 43 20 30 15 23 42 33 9 34 28 45 17
21 16 46 47 32 40 10 23 43 37 6 44 4 5 41 2 48 38 12 17 27 19 50 3 15 18 11 13 33 26 1 45 31 49 29 39 28 20 35 34 7 9 14 30 22 42 24 25 8 36
34 32 4 9 24 3 28 38 29 30 25 43 50 22 21 13 19 47 37 10 7 42 33 15 5 40 20 31 45 35 41 27 36 18 49 12 16 23 11 14 1 2 48 26 8 44 39 46 17 6
4 3 47 37 15 48 18 39 41 17 23 1 9 44 46 26 45 12 8 49 36 27 2 19 42 14 32 35 13 28 25 31 11 34 21 22 40 24 16 50 6 30 33 10 43 7 5 38 29 20
25 18 23 39 40 34 29 32 7 22 11 27 38 19 6 37 50 24 5 43 13 33 47 14 48 21 28 30 9 17 36 2 26 41 1 15 49 16 10 46 31 12 4 8 42 45 3 20 44 35
23 34 24 5 14 4 41 3 36 44 16 31 39 45 20 8 9 15 42 1 26 2 12 50 33 46 18 17 37 29 11 30 10 25 6 19 21 40 49 38 35 22 47 43 27 13 48 32 7 28
28 6 18 14 25 20 31 21 30 33 29 37 40 47 10 19 24 34 50 13 22 39 3 23 38 11 1 42 15 27 17 5 44 35 26 4 36 41 7 16 8 48 32 45 9 12 46 49 2 43
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...