Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
8
Task/Magic-constant/Maxima/magic-constant.maxima
Normal file
8
Task/Magic-constant/Maxima/magic-constant.maxima
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
magic(n) := sum(i, i, 1, n^2)/n$ /* Defining it this way makes computing the inverse too slow */
|
||||
magic(n) := n*(n^2+1)/2$ /* Therefore, we have to do it this way */
|
||||
|
||||
map(magic, makelist(i, i, 3, 22));
|
||||
magic(1003);
|
||||
|
||||
inv_magic(lower) := block(n: 3, while(magic(n)<=lower) do(n: n+1), n)$
|
||||
map(inv_magic, makelist(10^i, i, 1, 10));
|
||||
Loading…
Add table
Add a link
Reference in a new issue