OFFSET
1,1
COMMENTS
For example, 459 - 173 = 286 and 459173286 is a zeroless pandigital number.
MATHEMATICA
With[{s = Select[Range[#/9, #] &[10^3 - 1], DigitCount[#, 10, 0] == 0 &]}, Select[s, Function[n, AnyTrue[s, Function[k, And[n - k > 0, FreeQ[#, i_ /; i == 0], Length@ # == 9] &@ Union@ Apply[Join, IntegerDigits@ {n, k, n - k}]]]]]] (* Michael De Vlieger, Aug 01 2017 *)
PROG
(Java) import java.util.*; public class GenerateSequence {public static void main(String[] args) { Set<Integer> seq = new TreeSet<Integer>();
for (long i = 987654321l; i > 123456789; i--) {Set<Character> set = new HashSet<Character>(); String number = Long.toString(i);
if (!(number.contains("0"))) {for (int n = 0; n < 9; n++){set.add(number.charAt(n)); }
if (set.size() == 9) {
if (Integer.valueOf(number.substring(0, 3)) - Integer.valueOf(number.substring(3, 6)) == Integer.valueOf(number.substring(6, 9))) { seq.add(Integer.valueOf(number.substring(0, 3))); } } } System.out.println(seq); } }
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Jonathan Schwartz, Aug 01 2017
STATUS
approved