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-9 of 9 results.

A086068 Min{k: A086066(k) = n}.

Original entry on oeis.org

0, 1, 10, 2, 20, 12, 102, 3, 30, 13, 103, 23, 203, 123, 1023, 4, 40, 14, 104, 24, 204, 124, 1024, 34, 304, 134, 1034, 234, 2034, 1234, 10234, 5, 50, 15, 105, 25, 205, 125, 1025, 35, 305, 135, 1035, 235, 2035, 1235, 10235, 45, 405, 145, 1045, 245, 2045
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 08 2003

Keywords

Comments

Sequence is finite with last term a(2^10-1)=a(1023)=1023456789; A086067(1023456789)=1111111111.

Crossrefs

Programs

  • Maple
    A086068 := proc(n) local b,k,s: s:={}: if(n=1)then return 0: fi: b:=convert(n,base,2): for k from 1 to nops(b) do if(b[k] = 1)then s:=s union {k-1}: fi: od: s:=sort(convert(s,list)): if(s[1]=0)then return s[2]*10^(nops(s)-1)+add(s[j]*10^(nops(s)-j),j=3..nops(s)): else return add(s[j]*10^(nops(s)-j),j=1..nops(s)): fi: end: seq(A086068(n),n=1..53); # Nathaniel Johnston, Jun 01 2011

A276633 a(n) = smallest integer not yet in the sequence with no digits in common with a(n-1) and a(n-2); a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 22, 33, 11, 20, 34, 15, 26, 30, 14, 25, 36, 17, 24, 35, 16, 27, 38, 19, 40, 23, 18, 44, 29, 13, 45, 28, 31, 46, 50, 12, 37, 48, 21, 39, 47, 51, 32, 49, 55, 60, 41, 52, 63, 70, 42, 53, 61, 72, 43, 56, 71, 80, 54, 62, 73, 58, 64, 77, 59, 66, 74, 81, 65, 79
Offset: 0

Views

Author

Zak Seidov and Eric Angelini, Sep 08 2016

Keywords

Comments

The sequence is not a permutation of the positive integers. E.g., 123456789 and 1023456789 (the smallest pandigital number) are not members.
Numbers n such that a(n)=n: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 52, 147, 1619, 6140, ...
The sequence is infinite, since all digits in a(n-3) are allowed in a(n). - Robert Israel, Sep 20 2016

Examples

			From _David A. Corneth_, Sep 22 2016: (Start)
Each number can consist of 2^10-1 sets of distinct digits, i.e., classes. For example, 21132 is in the class {1, 2, 3}. We don't include a number without digits. For this sequence, we can also exclude numbers with only the digit 0. This leaves 1022 classes. We create a list with a place for each class containing the least number from that class not already in the sequence.
To illustrate the algorithm used to create the current b-file, we'll (for brevity) assume we've already calculated all terms for n = 1 to 100 and that we already know which classes will be used to compute the next 10 terms, for n = 101 to 110.
These classes are:  {0, 1}, {2, 3}, {5, 9}, {7, 9}, {8, 9}, {0, 1, 6}, {0, 1, 7}, {2, 2, 2} and {2, 2, 4} having the values 110, 223, 95, 97, 89, 106, 107, 222 and 224. a(99) = 104 and a(100) = 88, so from those values we may only choose from {223, 95, 97 and 222}. The least value in the list is 95. Therefore, a(101) = 95. The number for the class is now replaced with the next larger number having digits {5, 9} (=A276769(95)), being 559.
(One may see that in the example I only listed 9 classes. Class {8, 9} occurs twice in the example; a(104) = 89 and a(107) = 98.)
From a list of computed values up to some n, the values for classes may be updated to compute further. E.g., to compute a(20000), one may use the b-file to find the least number not already in the sequence for each class and then proceed from a(19998) and a(19999), etc. (End)
		

Crossrefs

Programs

  • Maple
    N:= 10^3: # to get all terms before the first > N
    for R in combinat:-powerset({$0..9}) minus {{},{$0..9}} do
      Lastused[R]:= [];
      MR[R]:= Array[0..9];
      for i from 1 to nops(R) do MR[R][R[i]]:= i od:
    od:
    A[0]:= 0: A[1]:= 1:
    S:= {0,1}:
    for n from 2 to N do
      R:= {$0..9} minus (convert(convert(A[n-1],base,10),set) union convert(convert(A[n-2],base,10),set));
      L:= Lastused[R];
      x:= 0;
      while member(x,S) do
        for d from 1 do
          if d > nops(L) then
            if R[1] = 0 then L:= [op(L),R[2]] else L:= [op(L),R[1]] fi;
            break
          elif L[d] < R[-1] then
            L[d]:= R[MR[R][L[d]]+1]; break
          else
            L[d]:= R[1];
          fi
        od;
        x:= add(L[j]*10^(j-1),j=1..nops(L));
      od;
      A[n]:= x;
      S:= S union {x};
      Lastused[R] := L;
    od:
    seq(A[i],i=0..N); # Robert Israel, Sep 20 2016
  • Mathematica
    s={0,1};Do[a=s[[-2]];b=s[[-1]];n=2;idab=Union[IntegerDigits[a],IntegerDigits[b]]; While[MemberQ[s,n]|| Intersection[idab,IntegerDigits[n]]!={},n++];AppendTo[s, n],{100}];s
  • Python
    from itertools import count, islice, product as P
    def only(s, D=1): # numbers with >= D digits only from s
        yield from (int("".join(p)) for d in count(D) for p in P(s, repeat=d))
    def agen(): # generator of terms
        aset, an1, an, minan = {0, 1}, 0, 1, 2
        yield from [0, 1]
        while True:
            an1, an, s = an, minan, set(str(an) + str(an1))
            use = "".join(c for c in "0123456789" if c not in s)
            for an in only(use, D=len(str(minan))):
                if an not in aset: break
            aset.add(an)
            yield an
            while minan in aset: minan += 1
    print(list(islice(agen(), 75))) # Michael S. Branicky, Jun 30 2022

A086069 Records in A086068.

Original entry on oeis.org

0, 1, 10, 20, 102, 103, 203, 1023, 1024, 1034, 2034, 10234, 10235, 10245, 10345, 20345, 102345, 102346, 102356, 102456, 103456, 203456, 1023456, 1023457, 1023467, 1023567, 1024567, 1034567, 2034567, 10234567, 10234568, 10234578, 10234678
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 08 2003

Keywords

Comments

a(n)=A086068(A086070(n)) and A086068(i)A086070(n);
A086066(a(n)) = A086070(n).

A086067 Bit string encoding occurrence of digits of n in decimal representation: d-th bit is set iff d occurs in (n)10, 0 <= d < 10.

Original entry on oeis.org

1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 11, 10, 110, 1010, 10010, 100010, 1000010, 10000010, 100000010, 1000000010, 101, 110, 100, 1100, 10100, 100100, 1000100, 10000100, 100000100, 1000000100
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 08 2003

Keywords

Crossrefs

Formula

a(n) = A007088(A086066(n)).

A086070 Where records in A086068 occur.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 15, 23, 27, 29, 31, 47, 55, 59, 61, 63, 95, 111, 119, 123, 125, 127, 191, 223, 239, 247, 251, 253, 255, 383, 447, 479, 495, 503, 507, 509, 511, 767, 895, 959, 991, 1007, 1015, 1019, 1021, 1023
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 08 2003

Keywords

Comments

A086069(n)=A086068(a(n)) and A086068(i) < A086069(n) for i
a(n) = A086066(A086069(n)).

Crossrefs

Cf. A086084.

A267089 T(n,k) is decimal conversion of 1's in an n X n table that lie on its principal diagonals.

Original entry on oeis.org

1, 3, 3, 5, 2, 5, 9, 6, 6, 9, 17, 10, 4, 10, 17, 33, 18, 12, 12, 18, 33, 65, 34, 20, 8, 20, 34, 65, 129, 66, 36, 24, 24, 36, 66, 129, 257, 130, 68, 40, 16, 40, 68, 130, 257, 513, 258, 132, 72, 48, 48, 72, 132, 258, 513, 1025, 514, 260, 136, 80, 32, 80, 136, 260, 514
Offset: 0

Author

Kival Ngaokrajang, Jan 10 2016

Keywords

Comments

Inspired by A137932 and A042948.
Conjectures:
(i) The first column is A083318.
(ii) T(n,k) = A086066(m) where m >= 10, n = m - 9*k, k = floor(m/10).

Examples

			See the "Illustration of initial terms" link for explicit examples.
Triangle begins:
n\k 0   1  2  3  4  5  6   7   8 ...
0   1
1   3   3
2   5   2  5
3   9   6  6  9
4  17  10  4 10 17
5  33  18 12 12 18 33
6  65  34 20  8 20 34 65
7 129  66 36 24 24 36 66 129
8 257 130 68 40 16 40 68 130 257
...
		

Crossrefs

A330898 Positive numbers k of the form x*y where k, x and y have the same set of decimal digits.

Original entry on oeis.org

1, 11, 100, 111, 1000, 1010, 1100, 1111, 10000, 10010, 10100, 10110, 11000, 11010, 11100, 11110, 11111, 31003, 99190, 100000, 100010, 100100, 100110, 101000, 101010, 101100, 101101, 101110, 110000, 110010, 110100, 110110, 111000, 111010, 111100, 111111, 266616
Offset: 1

Author

Rémy Sigrist, May 01 2020

Keywords

Comments

If k belongs to the sequence, then 100*k also belongs to the sequence.
The positive repunits belong to the sequence.
The first pandigital term is 1047463798950190521 = 1023456789^2.

Examples

			The first terms, alongside an appropriate factorization and the corresponding set of digits, are:
  n   a(n)    x    y       digits(n)
  --  ------  ---  ------  ---------
   1       1    1       1  {1}
   2      11    1      11  {1}
   3     100   10      10  {0, 1}
   4     111    1     111  {1}
   5    1000   10     100  {0, 1}
   6    1010   10     101  {0, 1}
   7    1100   10     110  {0, 1}
   8    1111    1    1111  {1}
   9   10000   10    1000  {0, 1}
  10   10010   10    1001  {0, 1}
  11   10100   10    1010  {0, 1}
  12   10110   10    1011  {0, 1}
  13   11000   10    1100  {0, 1}
  14   11010   10    1101  {0, 1}
  15   11100   10    1110  {0, 1}
  16   11110  101     110  {0, 1}
  17   11111    1   11111  {1}
  18   31003  103     301  {0, 1, 3}
  19   99190  109     910  {0, 1, 9}
		

Crossrefs

Programs

  • PARI
    is(n) = { my (s=Set(digits(n))); fordiv (n, d, if (Set(digits(d))==s && Set(digits(n/d))==s, return (1))); return (0) }

A362505 Nonnegative numbers of the form x*y where x and y have the same set of decimal digits.

Original entry on oeis.org

0, 1, 4, 9, 11, 16, 25, 36, 44, 49, 64, 81, 99, 100, 111, 121, 144, 169, 176, 196, 225, 252, 256, 275, 289, 324, 361, 396, 400, 403, 441, 444, 484, 529, 539, 574, 576, 625, 676, 704, 729, 736, 765, 784, 841, 891, 900, 961, 976, 999, 1000, 1008, 1010, 1024
Offset: 1

Author

Rémy Sigrist, Apr 23 2023

Keywords

Comments

Repunits (A002275), squares (A000290) and A330898 are subsequences.

Examples

			The first terms, alongside an appropriate factorization, are:
  n   a(n)  x   y
  --  ----  --  ---
   1     0   0    0
   2     1   1    1
   3     4   2    2
   4     9   3    3
   5    11   1   11
   6    16   4    4
   7    25   5    5
   8    36   6    6
   9    44   2   22
  10    49   7    7
  11    64   8    8
  12    81   9    9
  13    99   3   33
  14   100  10   10
  15   111   1  111
		

Crossrefs

Cf. A000290, A002275, A086066, A330898, A362506 (least x's).

Programs

  • PARI
    is(n) = { if (n==0, 1, fordiv (n, x, if (Set(digits(x))==Set(digits(n/x)), return (1))); return (0)); }
    
  • Python
    from sympy import divisors
    def ok(n): return n == 0 or any(set(str(x)) == set(str(n//x)) for x in divisors(n))
    print([k for k in range(1025) if ok(k)]) # Michael S. Branicky, Apr 23 2023

A385957 Prime(n) is the a(n)-th prime having its distinct digits.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 4, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 3, 1, 2, 1, 2, 3, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 5, 6, 3, 7, 3, 1, 1, 2, 1, 1, 4, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 3, 1, 1
Offset: 1

Author

David A. Corneth, Jul 13 2025

Keywords

Examples

			a(1) = 1 as prime(1) = 2 is the first prime having its distinct digits {2}.
a(11) = 2 as prime(11) = 31 is the second prime having its disitinct digits {1, 3} (the first is 13).
a(32) = 4 as prime(32) = 131 is the fourth prime having its distinct digits {1, 3} (the first three are 13, 31 and 113).
		

Crossrefs

Programs

  • Mathematica
    Block[{c, f, p}, c[] := 0; f[x] := Union@ IntegerDigits[x]; Reap[Do[p = Prime[n]; Sow[++c[f[p] ] ], {n, 120}] ][[-1, 1]] ] (* Michael De Vlieger, Jul 13 2025 *)
  • PARI
    \\ See Corneth link
Showing 1-9 of 9 results.