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 11-20 of 25 results. Next

A239664 a(n) = 1, a(n+1) = smallest number not occurring earlier, having with a(n) neither a common digit nor a common divisor.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Mar 23 2014

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (delete, intersect); import Data.Function (on)
    a239664 n = a239664_list !! (n-1)
    a239664_list = 1 : f 1 [2..] where
       f v ws = g ws where
         g (x:xs) = if gcd v x == 1 && ((intersect `on` show) v x == "")
                       then x : f x (delete x ws) else g xs
    
  • PARI
    {u=[]; a=1; for(n=1,99, print1(a","); u=setunion(u,[a]); while(#u>1&&u[2]==u[1]+1,u=u[^1]); for(k=u[1]+1,9e9, setsearch(u,k)&&next;gcd(k,a)>1&&next; #setintersect(Set(digits(a)),Set(digits(k)))&&next; a=k; next(2)));a} \\ M. F. Hasler, Sep 17 2016

A276512 a(n) = smallest integer not yet in the sequence with no digits in common with 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, 11, 22, 20, 13, 14, 24, 23, 15, 16, 26, 25, 17, 18, 28, 27, 19, 30, 32, 12, 40, 33, 21, 29, 34, 31, 50, 42, 36, 35, 41, 44, 37, 38, 45, 46, 39, 51, 47, 43, 52, 55, 48, 49, 53, 56, 60, 70, 54, 58, 61, 62, 57, 59, 63, 64, 71, 72, 65, 66, 73, 74, 68, 69, 75
Offset: 0

Views

Author

Zak Seidov and Eric Angelini, Sep 06 2016

Keywords

Comments

This is not a permutation of the nonnegative integers. E.g. 123456789 and 1023456789 (the smallest pandigital number) are not members.
a(n) = n for n = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 34, 84, 104, 105, 1449, 2889, 3183, ...

Crossrefs

Programs

  • Mathematica
    s={0,1};Do[a=s[[-2]];n=2; While[MemberQ[s,n]||Intersection [IntegerDigits[a],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(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

A030287 a(n) is the smallest k > a(n-1) such that k^2 has no digit in common with a(n-1)^2.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 15, 19, 20, 23, 26, 29, 30, 34, 47, 56, 65, 83, 85, 90, 156, 241, 264, 265, 291, 300, 334, 448, 563, 638, 715, 780, 961, 2000, 2261, 2457, 3335, 5478, 7154, 9128, 9569, 14220, 17654, 20000, 22609, 26462, 28604, 30000
Offset: 0

Views

Author

Keywords

Comments

a(n) = sqrt(A030288(n)). - Zak Seidov, Feb 20 2009

Crossrefs

Cf. A030288: squares whose digits do not appear in previous term.
Cf. A067581: a(n) has no digit of a(n-1).
See also A294660.

Programs

  • Mathematica
    Nest[Append[#, Block[{k = Last[#] + 1}, While[IntersectingQ @@ IntegerDigits@ {Last[#]^2, k^2}, k++]; k]] &, {0}, 50] (* Michael De Vlieger, Nov 03 2017 *)
  • PARI
    next_A030287(n,D=Set(digits(n^2)))=for(k=n+1,oo,#setintersect(Set(digits(k^2)),D)||return(k))
    print1(a=0);for(i=1,99,print1(","a=next_A030287(a))) \\ M. F. Hasler, Nov 08 2017

Extensions

Edited by N. J. A. Sloane, Feb 22 2009 at the suggestion of R. J. Mathar

A276766 a(n) = smallest nonnegative integer not yet in the sequence with no repeated digits and no digits in common with a(n-1), starting with a(0)=0.

Original entry on oeis.org

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

Views

Author

Claudio Meller, Sep 17 2016

Keywords

Comments

The author of this sequence is Rodolfo Kurchan, who mentioned this sequence in a Facebook Group "Series", cf. link.
The sequence is finite, with last term a(5274) = 78642. - M. F. Hasler, Sep 17 2016

Crossrefs

Programs

  • PARI
    {u=[]; (t(k)=if(#Set(k=digits(k))==#k,k)); a=1; for(n=1, 99, print1(a","); u=setunion(u, [a]); t(u[1])||u[1]++; while(#u>1&&u[2]<=u[1]+1, u=u[^1]); for(k=u[1]+1, 9e9, setsearch(u, k)&&next; (d=t(k))&& !#setintersect(Set(digits(a)), Set(d))&&(a=k)&&next(2))); a} \\ M. F. Hasler, Sep 17 2016
    
  • Python
    def ok(s, t): return len(set(t)) == len(t) and len(set(s+t)) == len(s+t)
    def agen(): # generator of complete sequence of terms
        aset, k, mink, MAX = {0}, 0, 1, 987654321
        while True:
            if k < MAX: yield k
            else: return
            k, s = mink, str(k)
            MAX = 10**(10-len(s))
            while k < MAX and (k in aset or not ok(s, str(k))):
                k += 1
            aset.add(k)
            while mink in aset: mink += 1
    print(list(agen())[:73]) # Michael S. Branicky, Jun 30 2022

Extensions

Edited by M. F. Hasler, Sep 17 2016

A362093 a(1) = 1, a(2) = 2; for n > 2, a(n) is the least positive integer not occurring earlier such that a(n) shares no digit with a(n-1) - a(n-2).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Apr 08 2023

Keywords

Comments

The sequence is likely to be finite although it contains at least 1 million terms.
Sequence is finite with 6080472 terms, since a(6080471) = 660606060 and a(6080472) = 8822811 have difference -651783249. - Michael S. Branicky, Apr 09 2023

Examples

			a(11) = 22 as a(10) - a(9) = 20 - 9 = 11, and 22 is the smallest unused number that does not contain the digit 1.
		

Crossrefs

Programs

  • Python
    # see link for program that generates full sequence

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

A249585 Lexicographically earliest permutation of the positive integers such that a(n+1) has at least one digit which increased by 1 is a digit of a(n).

Original entry on oeis.org

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

Views

Author

Eric Angelini and M. F. Hasler, Nov 01 2014

Keywords

Crossrefs

Programs

  • Maple
    N:= 200: # to get the first N terms
      S:= {}:
      m:= 2:
    a[1]:= 1:
    xnext:= proc(x)
        local j, Sc;
        Sc:= select(`>`,S,x);
        if Sc <> {} then min(Sc)
        elif x < m then m
        else x+1
        fi
    end proc:
    for n from 2 to N do
      adigs:= convert(convert(a[n-1],base,10),set);
      bdigs:= {$0..8} intersect map(`-`,adigs,1);
      c:= 0;
      do
        c:= xnext(c);
        if convert(convert(c,base,10),set) intersect bdigs <> {} then
           if member(c,S) then S:= S minus {c}
           else
             S:= S union {$m .. c-1};
             m:= c + 1;
           fi;
           a[n]:= c;
           break
        fi
      od;
    od:
    seq(a[n],n=1..N); # Robert Israel, Nov 03 2014
  • PARI
    A249585(n,show=0,a=1,u=[])={for(i=2,n, show&&print1(a","); u=setunion(u,Set(a)); D=Set(apply(d->d-1,digits(a))); while(setsearch(u,1+m=vecmin(u)),u=setminus(u,Set(m))); for(m=m+1,9e9,!setsearch(u,m)&&#setintersect(D,Set(digits(m))) &&(a=m)&&break));a} /* Using a more natural and simpler until() loop is 10x slower! */

A362076 a(1) = 1, a(2) = 2; for n > 2, a(n) is the least positive integer not occurring earlier such that a(n) shares no digit with a(n-2) * a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Apr 08 2023

Keywords

Comments

The sequence is finite; after 6481 terms a(6480) = 5211 and a(6481) = 44444 resulting in a product of 5211 * 44444 = 231597684. This contains all digits 1 to 9 so the next term does not exist.
The sequence contains 40 fixed points, the last being a(5477).

Examples

			a(12) = 22 as a(10) * a(11) = 10 * 11 = 110, and 22 is the smallest unused number that does not contain the digits 0 or 1.
		

Crossrefs

Programs

  • Python
    # see linked program

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

Original entry on oeis.org

1, 2, 3, 8, 4, 6, 13, 18, 40, 20, 121, 24, 364, 26, 9, 80, 10, 242, 12, 728, 27, 2186, 28, 6560, 30, 19682, 31, 59048, 36, 177146, 37, 531440, 39, 1594322, 81, 4782968, 82, 14348906, 84, 43046720, 85, 129140162, 90, 387420488, 91, 1162261466, 93
Offset: 1

Views

Author

R. J. Mathar, Mar 31 2009

Keywords

Comments

Numbers of A031944 do not appear in this sequence. After a number which has base-3 digits 0 and 1, a number of the form 3^k-1 (see A024023) follows by definition, because its base-3 digits are all 2.

Examples

			The 4th term cannot be 4 because 4(base10)=11(base3) shares a common digit 1 with a(3)=3(base10)=10(base3). It cannot be 5(base10)=12(base3) because this shares the digit 1 with 3=10(base3). It cannot be 6(base10)=20(base3) because this shares the digit 0 with 3=10(base3). It cannot be 7(base10)=21(base3) because this shares the digit 1 with 3=10(base3). It becomes a(4)=8(base10)=22(base3) which does not have the digit 0 or 1 of a(3)=10(base3).
		

Crossrefs

Cf. A067581 (base-10), A158929 (base-4), A158930 (base-5).

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).
Previous Showing 11-20 of 25 results. Next