Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
23
Task/Gapful-numbers/Mathematica/gapful-numbers.math
Normal file
23
Task/Gapful-numbers/Mathematica/gapful-numbers.math
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
ClearAll[GapFulQ]
|
||||
GapFulQ[n_Integer] := Divisible[n, FromDigits[IntegerDigits[n][[{1, -1}]]]]
|
||||
i = 100;
|
||||
res = {};
|
||||
While[Length[res] < 30,
|
||||
If[GapFulQ[i], AppendTo[res, i]];
|
||||
i++
|
||||
]
|
||||
res
|
||||
i = 10^6;
|
||||
res = {};
|
||||
While[Length[res] < 15,
|
||||
If[GapFulQ[i], AppendTo[res, i]];
|
||||
i++
|
||||
]
|
||||
res
|
||||
i = 10^9;
|
||||
res = {};
|
||||
While[Length[res] < 10,
|
||||
If[GapFulQ[i], AppendTo[res, i]];
|
||||
i++
|
||||
]
|
||||
res
|
||||
Loading…
Add table
Add a link
Reference in a new issue