Is HP42 smarter than a kid on TV?
|
04-30-2018, 02:20 PM
(This post was last modified: 04-30-2018 04:14 PM by Gerson W. Barbosa.)
Post: #8
|
|||
|
|||
RE: Is HP42 smarter than a kid on TV?
(04-30-2018 11:27 AM)Werner Wrote: Here’s a quick hack to create a magic square of odd order: Thanks for doing the harder part! Here is an easier add-on: Code:
Examples: 1) 5 XEQ MAGIC 265 XEQ MAG2 2) 3 XEQ MAGIC 27 XEQ MAG2 —> 08 13 06 07 09 11 12 05 10 Gerson. ========= PS: k = constant of the magic square (265 in the TV show) m = n(n^2 + 1)/2; magic constant of the original magic square (whose elements start with 1) n = order of the square c = (k - m)/n; constant to be added to each element of the original magic square so that the new magic sum is k Notice that k must be equal or greater than m and be divisible by n The sums, except the diagonals, can be checked with RSUM: ENTER RSUM X<>Y TRANS RSUM Just for fun, another example: 101 XEQ MAGIC 260176505 XEQ MAG2 Runs instantly on Free42 on my smartphone :-) Edited to delete the last three or four lines (there was no need to preserve Werner’s original matrix anymore). |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Is HP42 smarter than a kid on TV? - Dol - 04-28-2018, 08:03 PM
RE: Is HP42 smarter than a kid on TV? - pier4r - 04-28-2018, 08:14 PM
RE: Is HP42 smarter than a kid on TV? - Valentin Albillo - 04-28-2018, 10:18 PM
RE: Is HP42 smarter than a kid on TV? - RMollov - 04-30-2018, 09:09 AM
RE: Is HP42 smarter than a kid on TV? - Valentin Albillo - 04-30-2018, 10:50 PM
RE: Is HP42 smarter than a kid on TV? - RMollov - 05-01-2018, 11:14 AM
RE: Is HP42 smarter than a kid on TV? - Zaphod - 04-28-2018, 10:32 PM
RE: Is HP42 smarter than a kid on TV? - Valentin Albillo - 04-28-2018, 11:26 PM
RE: Is HP42 smarter than a kid on TV? - Werner - 04-30-2018, 11:27 AM
RE: Is HP42 smarter than a kid on TV? - Gerson W. Barbosa - 04-30-2018 02:20 PM
RE: Is HP42 smarter than a kid on TV? - Gerson W. Barbosa - 04-30-2018, 06:00 PM
|
User(s) browsing this thread: 1 Guest(s)