Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
27
Task/Zumkeller-numbers/Mathematica/zumkeller-numbers.math
Normal file
27
Task/Zumkeller-numbers/Mathematica/zumkeller-numbers.math
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
ClearAll[ZumkellerQ]
|
||||
ZumkellerQ[n_] := Module[{d = Divisors[n], t, ds, x},
|
||||
ds = Total[d];
|
||||
If[Mod[ds, 2] == 1,
|
||||
False
|
||||
,
|
||||
t = CoefficientList[Product[1 + x^i, {i, d}], x];
|
||||
t[[1 + ds/2]] > 0
|
||||
]
|
||||
];
|
||||
i = 1;
|
||||
res = {};
|
||||
While[Length[res] < 220,
|
||||
r = ZumkellerQ[i];
|
||||
If[r, AppendTo[res, i]];
|
||||
i++;
|
||||
];
|
||||
res
|
||||
|
||||
i = 1;
|
||||
res = {};
|
||||
While[Length[res] < 40,
|
||||
r = ZumkellerQ[i];
|
||||
If[r, AppendTo[res, i]];
|
||||
i += 2;
|
||||
];
|
||||
res
|
||||
Loading…
Add table
Add a link
Reference in a new issue