ScratchData LogoScratchData
Back to excelguru's profile

4x4 magic square

EXexcelguru•Created February 14, 2019
4x4 magic square
0
0
16 views
View on Scratch

Instructions

A magic square is a square grid filled with numbers, traditionally each number from 1 to the number of spaces, such that the sum of all the numbers in each row, column, and diagonal is the same. But the 4x4 magic square has more than that. I read in a book that there are 86 total ways to add up to the magic number, 34. I tried searching using a "now let's see if this is one" approach, but I could never get all 86. So I coded a program to do it. This project allows you to view all 86 ways to pick 4 numbers that add up to 34. The list is hard-coded, but you can see the script that generated it if you see inside. Navigate with space or the left/right arrows, or by pressing q to select a number. Some of the ways are symmetrical, others are not.

Description

Rows: 20, 81, 83, 4 Columns: 57, 32, 46, 16 Split rows: 1, 76, 86, 41 Alternated rows: 2, 79, 85, 23 Split columns: 5, 28, 51, 69 Alternated columns: 13, 31, 47, 60 Diagonals: 7, 67 Co-diagonals: 25, 53 Alternated diagonals: 10, 64 Blocks: 24, 54, 8, 66 Horizontally split blocks: 30, 48, 14, 59 Vertically split blocks: 42, 36, 12, 62 Exploded blocks: 45, 33, 15, 58 Center, corners and co-blocks: 84, 3, 21, 80 Chiral things: 34, 44 L-shapes: 11, 19, 27, 52, 63, 71, 72, 82 To be investigated: 6,9,17,18,22,26,29,35,37,38,39,40,43,49,50,55,56,61,65,68,70,73,74,75,76,77,78

Project Details

Project ID286735734
CreatedFebruary 14, 2019
Last ModifiedFebruary 16, 2019
SharedFebruary 14, 2019
Visibilityvisible
CommentsAllowed