The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A366965 Numbers whose difference between the largest and smallest digits is equal to 8. 9
19, 80, 91, 108, 119, 129, 139, 149, 159, 169, 179, 180, 189, 191, 192, 193, 194, 195, 196, 197, 198, 199, 208, 219, 280, 291, 308, 319, 380, 391, 408, 419, 480, 491, 508, 519, 580, 591, 608, 619, 680, 691, 708, 719, 780, 791, 800, 801, 802, 803, 804, 805, 806, 807, 808, 810 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The number of n-digit terms of this sequence is 17*9^(n-1) - 31*8^(n-1) + 2*7^n.
LINKS
MATHEMATICA
Select[Range[810], Max[d=IntegerDigits[#]]-Min[d]==8 &]
PROG
(Python)
def ok(n): return max(d:=list(map(int, str(n))))-min(d) == 8
print([k for k in range(900) if ok(k)]) # Michael S. Branicky, Oct 30 2023
(PARI) isok(n) = my(d=digits(n)); vecmax(d) - vecmin(d) == 8; \\ Michel Marcus, Nov 05 2023
CROSSREFS
Cf. A037904.
Cf. A010785 (difference = 0), A366958 (difference = 1), A366959 (difference = 2), A366960 (difference = 3), A366961 (difference = 4), A366962 (difference = 5), A366963 (difference = 6), A366964 (difference = 7), A366966 (difference = 9).
Sequence in context: A127270 A053665 A050522 * A172973 A212056 A290224
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Oct 30 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 7 16:42 EDT 2024. Contains 373203 sequences. (Running on oeis4.)