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

A054659 Increasing sequence with no repeating digits and no digits shared with previous term.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 23, 40, 51, 60, 71, 80, 91, 203, 415, 602, 713, 802, 913, 2045, 3167, 4025, 6137, 8024, 9135, 20467, 31589, 40267, 51389, 60247, 81359
Offset: 1

Views

Author

Henry Bottomley, Apr 18 2000

Keywords

Comments

a(11)=23 since a(10)=10 and any number from 11 to 21 would share a digit between the two terms while 22 has a repeated digit

Crossrefs

Cf. A030283.

Programs

  • 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
        an, MAX = 0, 987654321
        while True:
            if an < MAX: yield an
            else: return
            an, s = an+1, str(an)
            MAX = 10**(10-len(s))
            while an < MAX and not ok(s, str(an)): an += 1
    print(list(agen())) # Michael S. Branicky, Jun 30 2022

A229363 a(1) = 0; for n > 1: a(n) = smallest even number greater than a(n-1) which does not use any digit used by a(n-1).

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 22, 30, 42, 50, 62, 70, 82, 90, 112, 300, 412, 500, 612, 700, 812, 900, 1112, 3000, 4112, 5000, 6112, 7000, 8112, 9000, 11112, 30000, 41112, 50000, 61112, 70000, 81112, 90000, 111112, 300000, 411112, 500000, 611112, 700000, 811112, 900000
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 21 2013

Keywords

Comments

Essentially the same as A083490. - R. J. Mathar, Sep 24 2013

Crossrefs

Programs

  • Haskell
    import Data.List (intersect)
    a229363 n = a229363_list !! (n-1)
    a229363_list = f "" [0, 2 ..] where
       f xs (e:es) = if null $ intersect xs ys then e : f ys es else f xs es
                     where ys = show e

A358097 a(n) is the smallest integer m > n such that m and n have no common digit, or -1 when such integer m does not exist.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 22, 20, 30, 20, 20, 20, 20, 20, 20, 20, 31, 30, 30, 40, 30, 30, 30, 30, 30, 30, 41, 40, 40, 40, 50, 40, 40, 40, 40, 40, 51, 50, 50, 50, 50, 60, 50, 50, 50, 50, 61, 60, 60, 60, 60, 60, 70, 60, 60, 60, 71, 70, 70, 70, 70, 70, 70, 80, 70, 70, 81, 80, 80, 80, 80
Offset: 0

Views

Author

Bernard Schott, Oct 29 2022

Keywords

Comments

When n is pandigital with or without 0 (A050278, A050289, A171102), m does not exist, so a(n) = -1; see examples for smallest pandigital cases.

Examples

			a(10) = 22; a(11) = 20; a(12) = 30.
a(123456789) = -1; a(1234567890) = -1.
		

Crossrefs

Cf. A030283 (trajectory starting 0).
Cf. A358098 (similar, with largest integer m < n).

Programs

  • Mathematica
    a[n_] := Module[{d = Complement[Range[0, 9], IntegerDigits[n]], m = n + 1}, If[d == {} || d == {0}, -1, While[! AllTrue[IntegerDigits[m], MemberQ[d, #] &], m++]; m]]; Array[a, 100, 0] (* Amiram Eldar, Oct 29 2022 *)
  • PARI
    isfull(d) = my(dd=setminus([0..9], d)); (dd==[]) || (dd==[0]);
    a(n) = my(d=Set(digits(n))); if (isfull(d), -1, my(k=n+1); while (#setintersect(Set(digits(k)), d), k++); k); \\ Michel Marcus, Oct 29 2022
    
  • Python
    from itertools import count, product
    def a(n):
        s = str(n)
        r = sorted(set("1234567890") - set(s))
        if len(r) == 0 or r == ["0"]: return -1
        for d in count(len(s)):
            for p in product(r, repeat=d):
                m = int("".join(p))
                if m > n: return m
    print([a(n) for n in range(75)]) # Michael S. Branicky, Oct 29 2022

Formula

a(10^n-k) = 10^n when n >= 2 and 1 <= k <= 8.
a(10^n) = 2 * A002275(n+1), when n >= 1.

A030439 a(n+1) = smallest number not containing any digits of a(n), working in base 3.

Original entry on oeis.org

0, 1, 2, 3, 8, 9, 26, 27, 80, 81, 242, 243, 728, 729, 2186, 2187, 6560, 6561, 19682, 19683, 59048, 59049, 177146, 177147, 531440, 531441, 1594322, 1594323, 4782968, 4782969, 14348906, 14348907, 43046720, 43046721, 129140162, 129140163, 387420488, 387420489
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A030283.
Bisections give: A024023, A000244.

Formula

3^i-1 then 3^i.
a(n) = 4*a(n-2)-3*a(n-4); g.f.: -x*(x^2-2*x-1) / ((x-1)*(x+1)*(3*x^2-1)). - Colin Barker, Sep 13 2014
a(n) = 3^floor(n/2) -1 +(n mod 2). - Alois P. Heinz, Sep 14 2014

A100373 Lexicographically earliest increasing sequence of composite numbers such that the digits of a(n) do not appear in a(n-1).

Original entry on oeis.org

4, 6, 8, 9, 10, 22, 30, 42, 50, 62, 70, 81, 90, 111, 200, 314, 500, 611, 700, 812, 900, 1111, 2000, 3111, 4000, 5111, 6000, 7111, 8000, 9111, 20000, 31111, 40000, 51111, 60000, 71111, 80000, 91111, 200000, 311113, 400000, 511112, 600000, 711111
Offset: 1

Views

Author

Labos Elemer, Dec 01 2004

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(x) local L,S,carry,m,nL,b,d0,Lz,z,i,d;
      L:= convert(x,base,10);
      nL:= nops(L);
      S:= sort(convert({$0..9} minus convert(L,set),list));
      b:= nops(S);
      d0:= min(select(`>`,S,L[-1]));
      if d0 = infinity then
        if S[1] = 0 then Lz:= Vector([0$nL, S[2]])
        else Lz:= Vector([S[1]$(nL+1)])
        fi
      else
        Lz:= Vector([S[1]$(nL-1),d0])
      fi;
      d:= LinearAlgebra:-Dimension(Lz);
      do
        z:= add(Lz[i]*10^(i-1),i=1..d);
        if not isprime(z) then return z fi;
        carry:= true;
        for i from 1 to d while carry do
          if Lz[i] = S[-1] then Lz[i]:= S[1]
          else
            carry:= false; if member(Lz[i],S,'m') then Lz[i]:= S[m+1] fi
          fi
        od;
        if carry then d:= d+1; if S[1] = 0 then Lz(d):= S[2] else Lz(d) := S[1] fi fi
      od;
    end proc:
    R:= 4: r:= 4:
    for i from 2 to 100 do
      r:= f(r);
      R:= R,r
    od:
    R; # Robert Israel, Feb 27 2025
  • Mathematica
    ta={1};Do[s1=IntegerDigits[Part[ta, Length[ta]]]; s2=IntegerDigits[n];If[Equal[Intersection[s1, s2], {}] &&!PrimeQ[n], Print[{Last[ta], n}];ta=Append[ta, n]], {n, 1, 1000000}];ta=Delete[ta, 1]

A049548 a(n+1) = smallest number not containing any digits of a(n), working in base 4.

Original entry on oeis.org

0, 1, 2, 3, 4, 10, 12, 21, 32, 53, 128, 213, 512, 853, 2048, 3413, 8192, 13653, 32768, 54613, 131072, 218453, 524288, 873813, 2097152, 3495253, 8388608, 13981013, 33554432, 55924053, 134217728, 223696213, 536870912, 894784853, 2147483648
Offset: 0

Views

Author

Henry Bottomley, Dec 28 2000

Keywords

Examples

			Written in base 4 the sequence appears as 0, 1, 2, 3, 10, 22, 30, 111, 200, 311, 2000, 3111, 20000, 31111, 200000, 311111, 2000000, 3111111, etc. So a(9)=311 base 4 =53 base 10.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,5,0,-4},{0,1,2,3,4,10,12,21,32,53,128,213},40] (* Harvey P. Dale, Apr 27 2020 *)

Formula

For n>9, a(n)=4*a(n-2) + (a(n-2) mod 4).
a(n) = 5*a(n-2)-4*a(n-4) for n>5; g.f.: x*(32*x^10+16*x^9-12*x^8-12*x^7-17*x^6-x^4-6*x^3-2*x^2+2*x+1) / ((x-1)*(x+1)*(2*x-1)*(2*x+1)). - Colin Barker, Sep 13 2014
Previous Showing 11-16 of 16 results.