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

A158930 a(n) is the smallest integer not yet in the sequence with no common base-5 digit with a(n-1).

Original entry on oeis.org

1, 2, 3, 4, 5, 12, 6, 10, 8, 14, 15, 7, 18, 9, 13, 20, 11, 19, 25, 17, 21, 50, 16, 22, 26, 23, 27, 24, 28, 62, 29, 63, 30, 64, 31, 52, 33, 54, 41, 60, 34, 53, 46, 65, 49, 67, 45, 68, 100, 32, 75, 36, 78, 37, 79, 56, 90, 39, 93, 35, 94, 51, 98, 55, 99, 57, 95, 61, 103, 156, 69
Offset: 1

Views

Author

R. J. Mathar, Mar 31 2009

Keywords

Comments

Numbers of A031946 or of the 4th row of A051845 do not appear in this sequence. In base-5 notation the sequence reads 1,2,3,4,10,22,11,20,13,24,30,12,33,14,...

Examples

			The terms a(1) to a(4) are the first integers in order because they have only a single, non-common digit. a(5)=5(base10)=10(base5) does not share a digit with a(4)=4(base10)=4(base5). The numbers 6(base10)=11(base5) to 9(base10)=14(base5) are ruled out for a(6) because they share a 1 with 10(base5). The numbers 10(base10)=20(base5) and 11(base10)=21(base5) are also ruled out for a(6) because they either have a 0 or a 1 in common with a(5)=10(base5). So a(6)=12(base10)=22(base5) with no 0 or 1 is selected.
		

Crossrefs

Cf. A067581 (base-10), A158928 (base-3), A158929 (base-4).

Programs

  • Maple
    for S in combinat:-powerset({$0..4}) minus {{},{$0..4}} do
      if member(0,S) then Last[S]:= 0 else Last[S]:= 1 fi od:
    Next:= proc(S)
      global Last; local L, nL;
      if nops(S) = 1 then Last[S]:= Last[S]*5+S[1]; return Last[S] fi;
      Last[S]:= 1+Last[S];
      L:= convert(Last[S],base,nops(S));
      nL:= nops(L);
      if (not member(0,S)) then
       if L[-1] > 1 then
        Last[S]:= (nops(S))^nL;
        L:= [0$nL,1];
       else nL:= nL-1
       fi
      fi;
      L:= subs({seq(i-1=S[i],i=1..nops(S))},L);
      add(L[i]*5^(i-1),i=1..nL)
    end proc:
    Done:= {1}:
    A[1]:= 1:
    for n from 2 to 100 do
      S:= {$0..4} minus convert(convert(A[n-1],base,5),set);
      do
        x:= Next(S);
        if not member(x,Done) then break fi
      od;
      A[n]:= x;
      Done:= Done union {x};
    od:
    seq(A[i],i=1..100); # Robert Israel, Jun 25 2018

A158929 a(n) is the smallest integer not yet in the sequence with no common base-4 digit with a(n-1).

Original entry on oeis.org

1, 2, 3, 4, 10, 5, 8, 7, 32, 13, 34, 15, 6, 12, 9, 48, 21, 11, 16, 14, 17, 42, 19, 170, 20, 43, 64, 46, 65, 47, 68, 58, 69, 59, 80, 62, 81, 63, 18, 255, 22, 51, 25, 60, 26, 192, 37, 195, 38, 204, 41, 207, 85, 35, 341, 40, 23, 128, 29, 130, 31, 136, 53, 138, 55, 160, 61, 162
Offset: 1

Views

Author

R. J. Mathar, Mar 31 2009

Keywords

Comments

Numbers of A031945 do not appear in this sequence.

Examples

			The fifth term cannot be 5(base10)=11(base4), 6(base10)=12(base4), 7(base10)=13(base4), 8(base10)=20(base4) or 9(base10)=21(base4) because each of them has either a 0 or a 1 in its base-4 representation, which it would have in common with 4(base10)=10(base4). So a(5)=10(base10)=22(base4) which displays only digits of 2 in base 4.
		

Crossrefs

Cf. A067581 (base-10), A158928 (base-3), A158930 (base-5).
Showing 1-2 of 2 results.