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.

Showing 1-3 of 3 results.

A134336 Nonnegative integers n containing each digit between n's smallest and largest decimal digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 21, 22, 23, 32, 33, 34, 43, 44, 45, 54, 55, 56, 65, 66, 67, 76, 77, 78, 87, 88, 89, 98, 99, 100, 101, 102, 110, 111, 112, 120, 121, 122, 123, 132, 201, 210, 211, 212, 213, 221, 222, 223, 231, 232, 233, 234, 243, 312, 321, 322, 323
Offset: 1

Views

Author

Rick L. Shepherd, Oct 21 2007

Keywords

Comments

A032981 is a subsequence; the term 102 is the first positive integer not also in A032981. A171102 (pandigital numbers) and A033075 are subsequences. Union of A010785 (repdigits) and A108965.
a(n) = A178403(n) for n < 48. - Reinhard Zumkeller, May 27 2010
Equivalently, numbers with the property that the set of its decimal digits is a set of consecutive numbers. - Tanya Khovanova and Charles R Greathouse IV, Jul 31 2012

Crossrefs

Cf. A032981, A050278, A033075 (a subsequence), A010785, A108965.

Programs

  • PARI
    is(n)=my(v=vecsort(eval(Vec(Str(n))),,8));for(i=2,#v,if(v[i]!=1+v[i-1],return(0)));1 \\ Tanya Khovanova and Charles R Greathouse IV, Jul 31 2012
    
  • PARI
    is_A134336(n)={vecmax(n=Set(digits(n)))-vecmin(n)==#n-1} \\ M. F. Hasler, Dec 24 2014
    
  • Python
    def ok(n): d = sorted(set(map(int, str(n)))); return d[-1]-d[0]+1 == len(d)
    print([k for k in range(324) if ok(k)]) # Michael S. Branicky, Dec 12 2023

Formula

a(n) ~ n. - Charles R Greathouse IV, Sep 09 2011

Extensions

Edited by N. J. A. Sloane, Aug 06 2012

A252490 Numbers whose set of digits is simply connected, with 9 and 0 considered as neighbors.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 21, 22, 23, 32, 33, 34, 43, 44, 45, 54, 55, 56, 65, 66, 67, 76, 77, 78, 87, 88, 89, 90, 98, 99, 100, 101, 102, 109, 110, 111, 112, 120, 121, 122, 123, 132, 190, 201, 210, 211, 212, 213, 221, 222, 223, 231, 232, 233, 234, 243, 312, 321, 322, 323, 324, 332, 333, 334, 342, 343, 344, 345, 354, 423, 432
Offset: 1

Views

Author

M. F. Hasler, Dec 24 2014

Keywords

Comments

The set of digits must consist of a single run without "holes", but for a cyclic topology where 9 and 0 are seen as neighbors.
A superset of A134336. Namely, numbers in A134336 or such that the complement of their digits in {0,...,9} satisfies the criterion of A134336.

Crossrefs

Cf. A032981, A050278, A033075 (a subsequence), A010785, A108965, A134336 (a subsequence).

Programs

  • PARI
    is(n)=vecmax(if((d=Set(digits(n)))[1],d,d=setminus(vector(9,i,i),d)))-vecmin(d)==#d-1

A252481 Numbers whose set of digits is simply connected to 1.

Original entry on oeis.org

1, 10, 11, 12, 21, 100, 101, 102, 110, 111, 112, 120, 121, 122, 123, 132, 201, 210, 211, 212, 213, 221, 231, 312, 321, 1000, 1001, 1002, 1010, 1011, 1012, 1020, 1021, 1022, 1023, 1032, 1100, 1101, 1102, 1110, 1111, 1112, 1120, 1121, 1122, 1123, 1132, 1200, 1201, 1202, 1203, 1210, 1211, 1212, 1213, 1220, 1221, 1222, 1223
Offset: 1

Views

Author

M. F. Hasler, Dec 24 2014

Keywords

Comments

"Simply connected" means that there must not be a "hole" in the set of digits. E.g., {1,2,4} would not be allowed since '3' is missing.

Crossrefs

Programs

  • PARI
    is(n)={d=Set(digits(n));d[1]==1 || (#d>1&&d[2]==1) || return; d[#d]==#d-!d[1]}
    
  • Python
    def ok(n):
      s = set(str(n)); return '1' in s and len(s) == ord(max(s))-ord(min(s))+1
    def aupto(nn): return [m for m in range(1, nn+1) if ok(m)]
    print(aupto(1223)) # Michael S. Branicky, Jan 10 2021
Showing 1-3 of 3 results.