cp's OEIS Frontend

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.

A352927 Numbers whose digits are nonzero, consecutive, and all increasing or all decreasing.

This page as a plain text file.
%I A352927 #21 Jul 09 2025 04:58:49
%S A352927 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,
%T A352927 123,234,321,345,432,456,543,567,654,678,765,789,876,987,1234,2345,
%U A352927 3456,4321,4567,5432,5678,6543,6789,7654,8765,9876,12345,23456,34567,45678,54321,56789,65432,76543,87654,98765,123456,234567,345678
%N A352927 Numbers whose digits are nonzero, consecutive, and all increasing or all decreasing.
%C A352927 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
%H A352927 Michael S. Branicky, <a href="/A352927/b352927.txt">Table of n, a(n) for n = 1..81</a>
%t A352927 Join[Range[9],Select[Range[350000],DigitCount[#,10,0]==0&&(Union[Differences[IntegerDigits[ #]]]=={1}||Union[Differences[IntegerDigits[#]]]=={-1})&]] (* _Harvey P. Dale_, Aug 13 2023 *)
%o A352927 (Python)
%o A352927 def sgn(n): return 1 if n >= 0 else -1
%o A352927 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))
%o A352927 print(afull()) # _Michael S. Branicky_, May 01 2022
%Y A352927 Cf. A033075, A082927, A138141, A215014.
%K A352927 nonn,base,fini,full
%O A352927 1,2
%A A352927 _N. J. A. Sloane_, May 01 2022, following a suggestion from Ralph Sieber