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!)
A366963 Numbers whose difference between the largest and smallest digits is equal to 6. 9
17, 28, 39, 60, 71, 82, 93, 106, 117, 127, 137, 147, 157, 160, 167, 171, 172, 173, 174, 175, 176, 177, 206, 217, 228, 238, 248, 258, 260, 268, 271, 278, 282, 283, 284, 285, 286, 287, 288, 306, 317, 328, 339, 349, 359, 360, 369, 371, 379, 382, 389, 393, 394, 395, 396, 397, 398, 399 (list; graph; refs; listen; history; text; internal format)
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.
LINKS
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
Cf. A037904.
Cf. A010785 (difference = 0), A366958 (difference = 1), A366959 (difference = 2), A366960 (difference = 3), A366961 (difference = 4), A366962 (difference = 5), A366964 (difference = 7), A366965 (difference = 8), A366966 (difference = 9).
Sequence in context: A269307 A364555 A134468 * A032611 A255200 A350101
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 July 31 16:05 EDT 2024. Contains 374802 sequences. (Running on oeis4.)