OFFSET
1,1
COMMENTS
The digit 0 is never present in a(n) and never appears as a first difference (as this would duplicate in both cases one of the 8 remaining digits involved).
The sequence ends with a(96) = 98274.
The only prime numbers with this property are 39157, 49681, 51869, 53719, 62983, 68749, 68947, 75193, 78259, 89627 and 95287.
EXAMPLE
The five digits of a(1) = 14928 produce the four successive absolute first differences 3 (= 1 - 4), 5 (= 4 - 9), 7 (= 9 - 2) and 6 (= 2 - 8), resulting in nine distinct digits.
.1.4.9.2.8.
..3.5.7.6..
MATHEMATICA
Select[Range[10000, 99999], Sort@Join[IntegerDigits@#, Abs@Differences@IntegerDigits@#]==Range@9&]
CROSSREFS
KEYWORD
base,nonn,fini,full
AUTHOR
Eric Angelini and Giorgos Kalogeropoulos, Aug 29 2023
STATUS
approved