|
|
A352927
|
|
Numbers whose digits are nonzero, consecutive, and all increasing or all decreasing.
|
|
1
|
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 21, 23, 32, 34, 43, 45, 54, 56, 65, 67, 76, 78, 87, 89, 98, 123, 234, 321, 345, 432, 456, 543, 567, 654, 678, 765, 789, 876, 987, 1234, 2345, 3456, 4321, 4567, 5432, 5678, 6543, 6789, 7654, 8765, 9876, 12345, 23456, 34567, 45678, 54321, 56789, 65432, 76543, 87654, 98765, 123456, 234567, 345678
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
There are 81 terms, corresponding to numbers that start with i and end with j, for 1 <= i <= 9, 1 <= j <= 9. - Michael S. Branicky, May 01 2022
|
|
LINKS
|
|
|
MATHEMATICA
|
Join[Range[9], Select[Range[350000], DigitCount[#, 10, 0]==0&&(Union[Differences[IntegerDigits[ #]]]=={1}||Union[Differences[IntegerDigits[#]]]=={-1})&]] (* Harvey P. Dale, Aug 13 2023 *)
|
|
PROG
|
(Python)
def sgn(n): return 1 if n >= 0 else -1
def afull(): return sorted(int("".join(map(str, range(i, j+sgn(j-i), sgn(j-i))))) for i in range(1, 10) for j in range(1, 10))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,fini,full
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|