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

A030283 a(0) = 0; for n>0, a(n) is the smallest number greater than a(n-1) which does not use any digit used by a(n-1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 22, 30, 41, 50, 61, 70, 81, 90, 111, 200, 311, 400, 511, 600, 711, 800, 911, 2000, 3111, 4000, 5111, 6000, 7111, 8000, 9111, 20000, 31111, 40000, 51111, 60000, 71111, 80000, 91111, 200000, 311111, 400000, 511111, 600000
Offset: 0

Views

Author

Keywords

Comments

The sequence is infinite.

Crossrefs

Programs

  • Haskell
    a030283 n = a030283_list !! n
    a030283_list = 0 : f 1 9 0 where
       f u v w = w' : f u' v' w' where
         w' = until (> w) ((+ v) . (* 10)) u
         (u',v') = h u v
         h 1 0 = (2,2); h 9 0 = (1,1); h 9 1 = (2,0); h 9 9 = (1,0)
         h u 2 = (u+1,0); h u v = (u+1,1-v)
    -- Reinhard Zumkeller, May 03 2012
  • Mathematica
    a = {0}; For[n = 1, n < 1000000, n++, If[Length[Intersection[IntegerDigits[n], IntegerDigits[a[[ -1]]]]] == 0, AppendTo[a, n]]]; a (* Stefan Steinerberger, May 30 2007 *)

Formula

a(n) = a(n-2) + 10*a(n-8) - 10*a(n-10) for n > 29. - Nicolas Bělohoubek, Jul 01 2024

Extensions

Edited by N. J. A. Sloane at the suggestion of Rick L. Shepherd, Sep 27 2007
Definition clarified by Harvey P. Dale, Oct 19 2012

A068861 a(1) = 1; a(n+1) is the smallest number not already in the sequence which differs from a(n) at every digit.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Mar 13 2002

Keywords

Examples

			11 follows 20 as the smallest number not included earlier and differing at every digit position.
		

Crossrefs

Programs

  • Haskell
    import Data.List (delete)
    a068861 n = a068861_list !! (n-1)
    a068861_list = f "x" (map show [1..]) where
       f u us = g us where
         g (v:vs)
           | and $ zipWith (/=) u v = (read v :: Int) : f v (delete v us)
           | otherwise = g vs
    -- Reinhard Zumkeller, Dec 21 2013

A068862 Numbers n such that A068861(n) = n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 31, 48, 51, 68, 71, 88, 91, 108, 307, 309, 511, 688, 711, 888, 911, 1088, 3110, 7111, 10879
Offset: 1

Views

Author

Amarnath Murthy, Mar 13 2002

Keywords

Crossrefs

Programs

  • Maple
    V:= Vector(10^5):
    V[1]:= 1: m:= 2:
    count:= 1: A[1]:= 1:
    L:= [1]:
    for n from 2 to 12000 do
      for i from m to 10^5 do
        if V[i] = 0 then
          LL:= convert(i,base,10);
          k:= min(nops(L),nops(LL));
          if not has(LL[1..k] - L[1..k],0) then
            V[i]:= n;
            if i = m then
              for m from m+1 while V[m] <> 0 do od:
            fi;
            if i = n then
               count:= count+1;
               A[count]:= n;
            fi;
            L:= LL;
            break
          fi
        fi
      od;
      if i = 10^5 + 1 then break fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Mar 03 2016

Extensions

a(19)-a(30) from Robert Israel, Mar 03 2016
Showing 1-3 of 3 results.