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.

Previous Showing 21-30 of 35 results. Next

A107775 a(1)=4, a(n) = smallest integer not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Eric Angelini & Zak Seidov, May 24 2005

Keywords

Comments

Cf. A107353 a(1)=0, A107772 a(1)=1, A107773 a(1)=2, A107774 a(1)=3, A107776 a(1)=5, A107777 a(1)=6, A107778 a(1)=7, A107779 a(1)=8, A107780 a(1)=9, A107781 a(1)=10

Crossrefs

Programs

  • Mathematica
    f[l_] := Block[{c = 0}, While[ MemberQ[l, c] || Intersection @@ IntegerDigits /@{Last[l], c}=={}, c++ ];Return[Append[l, c]]];Nest[f, {4}, 70] (* Ray Chandler, Jul 19 2005 *)

A107776 a(1)=5, a(n) = smallest integer not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Eric Angelini & Zak Seidov, May 24 2005

Keywords

Comments

Cf. A107353 a(1)=0, A107772 a(1)=1, A107773 a(1)=2, A107774 a(1)=3, A107775 a(1)=4, A107777 a(1)=6, A107778 a(1)=7, A107779 a(1)=8, A107780 a(1)=9, A107781 a(1)=10

Crossrefs

Programs

  • Mathematica
    f[l_] := Block[{c = 0}, While[ MemberQ[l, c] || Intersection @@ IntegerDigits /@{Last[l], c}=={}, c++ ];Return[Append[l, c]]];Nest[f, {5}, 70] (* Ray Chandler, Jul 19 2005 *)

A107777 a(1)=6, a(n) = smallest integer not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Eric Angelini & Zak Seidov, May 24 2005

Keywords

Comments

Cf. A107353 a(1)=0, A107772 a(1)=1, A107773 a(1)=2, A107774 a(1)=3, A107775 a(1)=4, A107776 a(1)=5, A107778 a(1)=7, A107779 a(1)=8, A107780 a(1)=9, A107781 a(1)=10

Crossrefs

Programs

  • Mathematica
    f[l_] := Block[{c = 0}, While[ MemberQ[l, c] || Intersection @@ IntegerDigits /@{Last[l], c}=={}, c++ ];Return[Append[l, c]]];Nest[f, {6}, 70] (* Ray Chandler, Jul 19 2005 *)

A107779 a(1)=8, a(n) = smallest integer not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Eric Angelini & Zak Seidov, May 24 2005

Keywords

Comments

Cf. A107353 a(1)=0, A107772 a(1)=1, A107773 a(1)=2, A107774 a(1)=3, A107775 a(1)=4, A107776 a(1)=5, A107777 a(1)=6, A107778 a(1)=7, A107780 a(1)=9, A107781 a(1)=10

Crossrefs

Programs

  • Mathematica
    f[l_] := Block[{c = 0}, While[ MemberQ[l, c] || Intersection @@ IntegerDigits /@{Last[l], c}=={}, c++ ];Return[Append[l, c]]];Nest[f, {8}, 70] (* Ray Chandler, Jul 19 2005 *)

A107781 a(1)=10, a(n) = smallest integer not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Eric Angelini & Zak Seidov, May 24 2005

Keywords

Comments

Cf. A107353 a(1)=0, A107772 a(1)=1, A107773 a(1)=2, A107774 a(1)=3, A107775 a(1)=4, A107776 a(1)=5, A107777 a(1)=6, A107778 a(1)=7, A107779 a(1)=8, A107780 a(1)=9

Crossrefs

Programs

  • Mathematica
    f[l_] := Block[{c = 0}, While[ MemberQ[l, c] || Intersection @@ IntegerDigits /@{Last[l], c}=={}, c++ ];Return[Append[l, c]]];Nest[f, {10}, 70] (* Ray Chandler, Jul 19 2005 *)

A362371 a(0)=0. For each digit in the sequence, append the smallest unused integer that contains that digit.

Original entry on oeis.org

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

Views

Author

Gavin Lupo, Apr 17 2023

Keywords

Examples

			a(0) =  0
a(1) = 10 (from digit 0 in a(0)=0, smallest integer other than 0).
a(2) =  1 (from digit 1 in a(1)=10, smallest integer other than 10).
a(3) = 20 (from digit 0 in a(1)=10, smallest integer other than 0 and 10).
a(4) = 11 (from digit 1 in a(2)=1, smallest integer other than 1 and 10).
a(5) =  2 (from digit 2 in a(3)=20, smallest integer other than 20).
a(6) = 30 (from digit 0 in a(3)=20, smallest integer other than 0, 10, and 20).
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        s, aset, mink = "0", set(), 0
        for n in count(0):
            an = mink
            while an in aset or set(san:=str(an)) & {s[0]} == set(): an += 1
            s = s[1:] + san
            aset.add(an)
            yield an
            while mink in aset: aset.discard(mink); mink += 1
    print(list(islice(agen(), 67))) # Michael S. Branicky, Apr 25 2023

A317330 a(n) is the smallest positive integer not yet in the sequence that contains a digit equal to the sum of the digits of a(n-1) (mod 10); a(1)=0.

Original entry on oeis.org

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

Views

Author

Enrique Navarrete, Jul 25 2018

Keywords

Comments

Up to n=150 the only consecutive terms in the sequence are 19,20,21; 50,51; 90,91; 100,101; 106,107; 108,109,110.
Up to n=150 the sequence of first differences is bounded by -57 and 57 (in nonconsecutive terms).
From Robert G. Wilson v, Jul 26 2018: (Start)
It appears that every number appears.
If so the inverse permutation would be: 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 20, 21, 37, 22, 27, 23, ..., .
(End)
Yes, every number appears. Every pandigital number must eventually appear, and for each d in [0,9] there are infinitely many pandigital numbers with digit sum == d (mod 10), so every number containing digit d will eventually appear. - Robert Israel, Aug 30 2018

Examples

			a(5)=2 since a(4)=11 and 1+1 is congruent to 2 (mod 10).
a(21)=20 since a(20)=19 and 1+9 is congruent to 0 (mod 10).
		

Crossrefs

Cf. A107353.

Programs

  • Maple
    N:= 1000: # to get all terms before the first term > N
    A[1]:= 0:
    for d from 0 to 9 do S[d]:= select(t -> member(d, convert(t,base,10)), {$1..N}) od:
    for n from 2 do
      dd:= convert(convert(A[n-1],base,10),`+`) mod 10;
      if S[dd] = {} then break fi;
      A[n]:= min(S[dd]);
      for d from 0 to 9 do S[d]:= S[d] minus {A[n]} od:
    od:
    seq(A[i],i=1..n-1); # Robert Israel, Aug 30 2018
  • Mathematica
    f[lst_List] := Block[{k = 1, l = Mod[Plus @@ IntegerDigits@lst[[-1]], 10]}, While[MemberQ[lst, k] || Union[MemberQ[{l}, #] & /@ IntegerDigits@k][[-1]] == False, k++]; Append[lst, k]]; Nest[f, {0}, 72] (* Robert G. Wilson v, Jul 26 2018 *)

A298208 a(n) is the smallest positive integer not yet in the sequence that shares a digit with a(n-2) and shares no digit with a(n-1); a(1) = 0, a(2) = 1.

Original entry on oeis.org

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

Views

Author

Enrique Navarrete, Jan 15 2018

Keywords

Comments

Initial fixed points are 47, 52, 56, 58, 72, 81, 94, 101, 13661, 13663. - Corrected and extended by Robert Israel, Feb 09 2018
Inverse: 0, 1, 4, 9, 10, 15, 16, 21, 22, 27, 5, 3, 28, 7, 12, 17, 14, 19, 24, 32, 2, 30, 6, 11, 8, 13, 18, 23, 20, 25, 31, ..., . - Robert G. Wilson v, Feb 09 2018

Crossrefs

Cf. A107353 (where each term must share a digit with the preceding term).
Cf. A297418.

Programs

  • Maple
    N:= 1000: # to get all terms before the first term > N
    a[1] := 0: a[2] := 1: first := 2:
    Next := Array(2 .. N, i -> i+1):
    Prev := Array(2 .. N, i -> i-1): Prev[2] := 0:
    for n from 0 to N do
      digs[n] := convert(convert(n, base, 10), set)
    od:
    for n from 3 do
      D1 := digs[a[n-1]];
      D2 := digs[a[n-2]];
      t := first;
      while digs[t] intersect D2 = {} or digs[t] intersect D1 <> {} do
        t := Next[t];
        if t > N then break fi
      od;
      if t > N then break fi;
      a[n] := t;
      if Prev[t] = 0 then first := Next[t] else Next[Prev[t]] := Next[t] fi; if Next[t] <= N then Prev[Next[t]] := Prev[t] fi
    od:
    seq(a[i],i=1..n-1); # Robert Israel, Feb 09 2018
  • Mathematica
    f[s_List] := Block[{a = Union@ IntegerDigits@ s[[-2]], b = Union@ IntegerDigits@ s[[-1]], k = 2}, While[id = Union@ IntegerDigits@ k; MemberQ[s, k] || Intersection[a, id] == {} || Intersection[b, id] != {}, k++]; Append[s, k]]; Nest[f, {0, 1}, 66] (* Robert G. Wilson v, Feb 09 2018 *)

A302095 a(n) is the smallest positive integer not yet in the increasing sequence that is obtained when the largest digit from a(n-1) is deleted and the remaining digits are permuted such that no digit in a(n) has the same position it had in a(n-1) (counting from left to right). No repeated digits allowed; a(1)=10.

Original entry on oeis.org

10, 230, 402, 520, 602, 720, 802, 920, 1023, 2104, 3012, 4120, 5012, 6120, 7012, 8120, 9012, 12034, 20153, 31024, 50132, 61023, 70132, 81023, 90132, 120435, 201346, 310254, 401326, 510234, 601342, 710234, 801342, 910234, 1023456, 2104375, 3012456, 4103275, 5012346, 7103254
Offset: 1

Views

Author

Enrique Navarrete, May 19 2018

Keywords

Comments

All terms in the sequence contain 0.
The fact that all digits in the terms are distinct makes the sequence finite.
In fact, the sequence contains 59 terms and a(59)=901325476.
The terms that require the smallest number of permutations to recover their natural ordering are a(1)=10, a(9)=1023 and a(35)=1023456 (one permutation required).

Examples

			a(2)=230 since it is the smallest positive integer not yet in the sequence that is obtained when the largest digit 1 from a(1)=10 is deleted, the remaining digit 0 is permuted from the second to third place, and no digits are repeated.
		

Crossrefs

A303657 a(n) is the least positive integer not yet in the sequence which shares a digit with a(n-2); a(1)=0, a(2)=1.

Original entry on oeis.org

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

Views

Author

Enrique Navarrete, Apr 27 2018

Keywords

Comments

Up to n=34 the first differences of the sequence are bounded by -29 and 25; the bounds are -10 and 10 thereafter.
From a(103)=100 onwards, the sequence has slope = 1 with minor jumps about every 100 terms.
It appears that this sequence has an inverse, namely 1, 2, 7, 8, 15, 18, 24, 25, 30, 31, 3, 4, 5, 6, 13, 20, 22, 23, 32, 33, 9, ..., . - Robert G. Wilson v, Apr 29 2018 [Edited by Rémy Sigrist, May 06 2018]

Examples

			a(7)=2 since it is the least positive integer not yet in the sequence which shares a digit with a(5)=12.
		

Crossrefs

Programs

  • Mathematica
    f[s_List] := Block[{k = 2, l = Union@ IntegerDigits@ s[[-2]]}, While[MemberQ[s, k] || Intersection[l, IntegerDigits@ k] == {}, k++]; Append[s, k]]; Nest[f, {0, 1}, 70] (* Robert G. Wilson v, Apr 29 2018 *)
  • PARI
    Digits(x,b)=if(!x,[0],digits(x,b));
    firstTerms(n,{k=2},{b=10})={my(N=b*n);my(s=List(vector(N,u,u-1)),t,x,y);for(m=k+1,n,x=Set(Digits(s[m-k],b));for(i=m,N,y=Set(Digits(s[i],b));if(#setintersect(x,y),t=s[i];listpop(s,i);listinsert(s,t,m);break)));return(Vec(s)[1..n])}
    a(n)=firstTerms(n)[n]; \\ R. J. Cano, May 05 2018
    
  • PARI
    See Cano link.
Previous Showing 21-30 of 35 results. Next