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

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

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

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

Original entry on oeis.org

2, 3, 5, 7, 11, 23, 17, 29, 13, 31, 19, 37, 41, 53, 47, 59, 43, 61, 73, 67, 71, 83, 79, 97, 89, 101, 223, 107, 211, 103, 227, 109, 233, 127, 239, 113, 229, 131, 257, 139, 241, 137, 251, 149, 263, 151, 269, 157, 271, 163, 277, 181, 293, 167, 281, 173, 307, 179
Offset: 1

Views

Author

Amarnath Murthy, Mar 13 2002

Keywords

Examples

			13 follows 29 as the smallest prime number not included earlier and differing at every digit position with 29.
		

Crossrefs

Cf. A068853.
Cf. A085136.
Cf. A068861.

Programs

  • Haskell
    import Data.List (delete)
    a068863 n = a068863_list !! (n-1)
    a068863_list = f "x" (map show a000040_list) where
       f p ps = g ps where
         g (q:qs)
           | and $ zipWith (/=) p q = (read q :: Int) : f q (delete q ps)
           | otherwise = g qs
    -- Reinhard Zumkeller, Dec 21 2013 [Warning: this code might not be correct - Sean A. Irvine, Mar 19 2024]

Extensions

Corrected and extended by Sascha Kurz, Feb 02 2003

A068860 a(1) = 1; a(n+1) is the smallest number > a(n) which differs from it at every digit.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 30, 41, 50, 61, 70, 81, 90, 101, 210, 301, 410, 501, 610, 701, 810, 901, 1010, 2101, 3010, 4101, 5010, 6101, 7010, 8101, 9010, 10101, 21010, 30101, 41010, 50101, 61010, 70101, 81010, 90101, 101010, 210101, 301010, 410101, 501010
Offset: 1

Views

Author

Amarnath Murthy, Mar 13 2002

Keywords

Comments

a(9001) has 1001 digits. - Michael S. Branicky, Mar 19 2024

Examples

			After 90 the next member is 101 which differs at each digit position.
		

Crossrefs

Cf. A068861.

Programs

  • Python
    def a(n):
        q, r = divmod(n-1, 9)
        d, f = q+1, r+1
        return int((str(f) + "0"*(f%2) + "10"*(d//2))[:d])
    print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Mar 19 2024

Formula

a(n) = fabab... where f = ((n-1) mod 9) + 1 and ab = 01 if f is odd else 10 and has floor((n-1)/9)+1 digits. - Michael S. Branicky, Mar 19 2024

Extensions

a(48) and beyond from Michael S. Branicky, Mar 19 2024

A353780 a(1) = 1; for n > 1, a(n) is the smallest positive number that has not yet appeared that is coprime to a(n-1), does not equal a(n-1)+1, and has no digit in common with a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, May 07 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(15) = 27 as a(14) = 10, and 27 has not yet appeared, is coprime to 10, is not 1 more than 10, and has no digit in common with 10. Note that 21 satisfies all of these conditions except the last. This is the first term to differ from A353904.
		

Crossrefs

Programs

  • Python
    from math import gcd
    from itertools import islice
    def c(san, k): return set(san) & set(str(k)) == set()
    def agen(): # generator of terms
        an, aset, mink = 1, {1}, 2
        while True:
            yield an
            k, san = mink, str(an)
            while k in aset or gcd(an, k) != 1 or k-an == 1 or not c(san, k):
                k += 1
            an = k
            aset.add(an)
            while mink in aset: mink += 1
    print(list(islice(agen(), 75))) # Michael S. Branicky, May 23 2022

A353904 a(1) = 1; for n > 1, a(n) is the smallest positive number that has not yet appeared that is coprime to a(n-1), does not equal a(n-1)+1, and differs from a(n-1) at every digit.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, May 10 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(13) = 23 as a(12) = 14, and 23 has not yet appeared, is coprime to 14, is not 1 more than 14, and differs at every digit from 14. Note that 17 satisfies all of these conditions except the last. This is the first term to differ from A093714.
		

Crossrefs

Programs

  • Python
    from math import gcd
    from itertools import islice
    def c(san, k):
        sk = str(k)
        return all(sk[-1-i]!=san[-1-i] for i in range(min(len(san), len(sk))))
    def agen(): # generator of terms
        an, aset, mink = 1, {1}, 2
        while True:
            yield an
            k, san = mink, str(an)
            while k in aset or gcd(an, k) != 1 or k-an == 1 or not c(san, k):
                k += 1
            an = k
            aset.add(an)
            while mink in aset: mink += 1
    print(list(islice(agen(), 77))) # Michael S. Branicky, May 23 2022
Showing 1-6 of 6 results.