23 lines
366 B
Text
23 lines
366 B
Text
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
|