Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
50
Task/Arithmetic-numbers/Mathematica/arithmetic-numbers.math
Normal file
50
Task/Arithmetic-numbers/Mathematica/arithmetic-numbers.math
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
ClearAll[ArithmeticNumberQ]
|
||||
ArithmeticNumberQ[n_Integer] := IntegerQ[Mean[Divisors[n]]]
|
||||
ArithmeticNumberQ[30]
|
||||
|
||||
an = {};
|
||||
PrintTemporary[Dynamic[{i, Length[an]}]];
|
||||
Do[
|
||||
If[ArithmeticNumberQ[i],
|
||||
AppendTo[an, i];
|
||||
If[Length[an] >= 100, Break[]]
|
||||
]
|
||||
,
|
||||
{i, 1, \[Infinity]}
|
||||
];
|
||||
an
|
||||
|
||||
an = {};
|
||||
Do[
|
||||
If[ArithmeticNumberQ[i],
|
||||
AppendTo[an, i];
|
||||
If[Length[an] >= 1000, Break[]]
|
||||
]
|
||||
,
|
||||
{i, 1, \[Infinity]}
|
||||
];
|
||||
a1 = {Length[an], Last[an], Count[CompositeQ[an], True]};
|
||||
|
||||
an = {};
|
||||
Do[
|
||||
If[ArithmeticNumberQ[i],
|
||||
AppendTo[an, i];
|
||||
If[Length[an] >= 10000, Break[]]
|
||||
]
|
||||
,
|
||||
{i, 1, \[Infinity]}
|
||||
];
|
||||
a2 = {Length[an], Last[an], Count[CompositeQ[an], True]};
|
||||
|
||||
an = {};
|
||||
Do[
|
||||
If[ArithmeticNumberQ[i],
|
||||
AppendTo[an, i];
|
||||
If[Length[an] >= 100000, Break[]]
|
||||
]
|
||||
,
|
||||
{i, 1, \[Infinity]}
|
||||
];
|
||||
a3 = {Length[an], Last[an], Count[CompositeQ[an], True]};
|
||||
|
||||
TableForm[{a1, a2, a3}, TableHeadings -> {None, {"X", "Xth in series", "composite"}}]
|
||||
Loading…
Add table
Add a link
Reference in a new issue