OFFSET
1,1
COMMENTS
The digit 0 is never present in a(n) and never appears as a first or a second difference (as this would duplicate in both cases one of the 8 remaining digits involved).
The sequence ends with a(18) = 9318.
EXAMPLE
2983 is a term since its three successive absolute first differences 7 (= 2 - 9), 1 (= 9 - 8), 5 (= 8 - 3) and the successive absolute second differences 6 (= 7 - 1) and 4 (= 1 - 5), are nine distinct digits.
2 9 8 3
7 1 5
6 4
MATHEMATICA
Select[Range[1000, 9999], Sort@Join[IntegerDigits@#, s=Abs@Differences@IntegerDigits@#, Abs@Differences@s]==Range@9&]
CROSSREFS
KEYWORD
base,nonn,fini,full
AUTHOR
Eric Angelini and Giorgos Kalogeropoulos, Aug 29 2023
STATUS
approved