This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A366964 #12 Nov 10 2023 12:27:57 %S A366964 18,29,70,81,92,107,118,128,138,148,158,168,170,178,181,182,183,184, %T A366964 185,186,187,188,207,218,229,239,249,259,269,270,279,281,289,292,293, %U A366964 294,295,296,297,298,299,307,318,329,370,381,392,407,418,429,470,481,492 %N A366964 Numbers whose difference between the largest and smallest digits is equal to 7. %C A366964 The number of n-digit terms is 23*8^(n-1) - 41*7^(n-1) + 2^n*3^(n+1). %t A366964 Select[Range[500],Max[d=IntegerDigits[#]]-Min[d]==7 &] %o A366964 (Python) %o A366964 def ok(n): return max(d:=list(map(int, str(n))))-min(d) == 7 %o A366964 print([k for k in range(500) if ok(k)]) # _Michael S. Branicky_, Oct 30 2023 %o A366964 (PARI) isok(n) = my(d=digits(n)); vecmax(d) - vecmin(d) == 7; \\ _Michel Marcus_, Nov 05 2023 %Y A366964 Cf. A037904. %Y A366964 Cf. A010785 (difference = 0), A366958 (difference = 1), A366959 (difference = 2), A366960 (difference = 3), A366961 (difference = 4), A366962 (difference = 5), A366963 (difference = 6), A366965 (difference = 8), A366966 (difference = 9). %K A366964 nonn,base,easy %O A366964 1,1 %A A366964 _Stefano Spezia_, Oct 30 2023