OFFSET
1,1
COMMENTS
The number of n-digit terms of this sequence is 27*7^(n-1) - 47*6^(n-1) + 4*5^n.
MATHEMATICA
Select[Range[400], Max[d=IntegerDigits[#]]-Min[d]==6 &]
PROG
(Python)
def ok(n): return max(d:=list(map(int, str(n))))-min(d) == 6
print([k for k in range(400) if ok(k)]) # Michael S. Branicky, Oct 30 2023
(PARI) isok(n) = my(d=digits(n)); vecmax(d) - vecmin(d) == 6; \\ Michel Marcus, Nov 05 2023
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Oct 30 2023
STATUS
approved