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 31-40 of 40 results.

A261793 Successively add the smallest number that is not a substring in decimal representation.

Original entry on oeis.org

1, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 17, 19, 21, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 01 2015

Keywords

Crossrefs

Cf. A031298, A261794, A261795 (first differences), A261806, A260273, A261786

Programs

  • Haskell
    a261793 n = a261793_list !! (n-1)
    a261793_list = iterate (\x -> x + a261794 x) 1

A080719 Replace decimal digits with their binary values and convert back to decimal representation.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 6, 7, 12, 13, 14, 15, 24, 25, 4, 5, 10, 11, 20, 21, 22, 23, 40, 41, 6, 7, 14, 15, 28, 29, 30, 31, 56, 57, 8, 9, 18, 19, 36, 37, 38, 39, 72, 73, 10, 11, 22, 23, 44, 45, 46, 47, 88, 89, 12, 13, 26, 27, 52, 53, 54, 55, 104, 105, 14, 15, 30, 31, 60, 61, 62
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 06 2003

Keywords

Comments

m is a local maximum iff m == 9 modulo 10 (see A017377).
A257831 seen as binary numbers: A007088(a(n)) = A257831(n). - Reinhard Zumkeller, May 10 2015

Examples

			n=27 -> '2''7' -> '10''111' -> '10111' -> 23: a(27)=23.
See also A257831.
		

Crossrefs

Programs

  • Haskell
    import Data.Maybe (mapMaybe)
    a080719 = foldr (\b v -> 2 * v + b) 0 .
               concat . mapMaybe (flip lookup bin) . a031298_row
                where bin = zip [0..9] a030308_tabf
    -- Reinhard Zumkeller, May 10 2015
    
  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits[#,2]&/@IntegerDigits[n]],2],{n,80}] (* Harvey P. Dale, Aug 30 2014 *)
  • Python
    def A080719(n):
        return int(''.join((format(int(d),'b') for d in str(n))),2)
    # Chai Wah Wu, May 10 2015

Extensions

a(0)=0 prepended and offset changed by Reinhard Zumkeller, May 10 2015

A261794 a(n) is the smallest nonzero number that is not a substring of n in decimal representation.

Original entry on oeis.org

1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 01 2015

Keywords

Comments

A261795(n) = a(A261793(n)).

Crossrefs

Programs

  • Haskell
    import Data.List (isInfixOf)
    a261794 x = f $ tail a031298_tabf where
       f (cs:css) = if isInfixOf cs (a031298_row x)
                       then f css else foldr (\d v -> 10 * v + d) 0 cs

Extensions

Name corrected by Álvar Ibeas, Sep 08 2020

A262437 Triangle T(n,k): write n in base 16, reverse order of digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1, 12, 1, 13, 1, 14, 1, 15, 1, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 2, 9, 2, 10, 2, 11, 2, 12, 2, 13, 2, 14, 2, 15, 2
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 22 2015

Keywords

Comments

Sum(T(n,k)*16^k : k = 0..A262438(n)-1) = n.

Examples

			.   n | HEX | T(n,*)        n | HEX | T(n,*)        n | HEX | T(n,*)
. ----+-----+--------     ----+-----+--------     ----+-----+--------
.   0 |   0 |  [0]         24 |  18 |  [8,1]       48 |  30 |  [0,3]
.   1 |   1 |  [1]         25 |  19 |  [9,1]       49 |  31 |  [1,3]
.   2 |   2 |  [2]         26 |  1A |  [10,1]      50 |  32 |  [2,3]
.   3 |   3 |  [3]         27 |  1B |  [11,1]      51 |  33 |  [3,3]
.   4 |   4 |  [4]         28 |  1C |  [12,1]      52 |  34 |  [4,3]
.   5 |   5 |  [5]         29 |  1D |  [13,1]      53 |  35 |  [5,3]
.   6 |   6 |  [6]         30 |  1E |  [14,1]      54 |  36 |  [6,3]
.   7 |   7 |  [7]         31 |  1F |  [15,1]      55 |  37 |  [7,3]
.   8 |   8 |  [8]         32 |  20 |  [0,2]       56 |  38 |  [8,3]
.   9 |   9 |  [9]         33 |  21 |  [1,2]       57 |  39 |  [9,3]
.  10 |   A |  [10]        34 |  22 |  [2,2]       58 |  3A |  [10,3]
.  11 |   B |  [11]        35 |  23 |  [3,2]       59 |  3B |  [11,3]
.  12 |   C |  [12]        36 |  24 |  [4,2]       60 |  3C |  [12,3]
.  13 |   D |  [13]        37 |  25 |  [5,2]       61 |  3D |  [13,3]
.  14 |   E |  [14]        38 |  26 |  [6,2]       62 |  3E |  [14,3]
.  15 |   F |  [15]        39 |  27 |  [7,2]       63 |  3F |  [15,3]
.  16 |  10 |  [0,1]       40 |  28 |  [8,2]       64 |  40 |  [0,4]
.  17 |  11 |  [1,1]       41 |  29 |  [9,2]       65 |  41 |  [1,4]
.  18 |  12 |  [2,1]       42 |  2A |  [10,2]      66 |  42 |  [2,4]
.  19 |  13 |  [3,1]       43 |  2B |  [11,2]      67 |  43 |  [3,4]
.  20 |  14 |  [4,1]       44 |  2C |  [12,2]      68 |  44 |  [4,4]
.  21 |  15 |  [5,1]       45 |  2D |  [13,2]      69 |  45 |  [5,4]
.  22 |  16 |  [6,1]       46 |  2E |  [14,2]      70 |  46 |  [6,4]
.  23 |  17 |  [7,1]       47 |  2F |  [15,2]      71 |  47 |  [7,4]
.  24 |  18 |  [8,1]       48 |  30 |  [0,3]       72 |  48 |  [8,4]  .
		

Crossrefs

Cf. A001025, A262438 (row lengths), A030308 (binary), A030341 (ternary), A031298 (decimal).

Programs

  • Haskell
    a262437 n k = a262437_tabf !! n !! k
    a262437_row n = a262437_tabf !! n
    a262437_tabf = iterate succ [0] where
       succ []      = [1]
       succ (15:hs) = 0 : succ hs
       succ (h:hs)  = (h + 1) : hs

A038528 If n has decimal expansion abc...d, with k digits, let f(n) be obtained by deleting all k's from abc...d, closing up and deleting initial 0's; sequence gives n such that f(f(f(...(n)))) = 0 or empty.

Original entry on oeis.org

1, 12, 20, 21, 22, 123, 132, 133, 203, 213, 223, 230, 231, 232, 300, 301, 303, 312, 313, 320, 321, 322, 330, 331, 333, 1234, 1243, 1244, 1324, 1334, 1342, 1343, 1423, 1424, 1432, 1433, 1442, 1444, 2034, 2043, 2044, 2134, 2143, 2144, 2234
Offset: 1

Views

Author

Keywords

Comments

The sequence has exactly 14174521 terms, 999999999 is the last and largest. - Reinhard Zumkeller, Jul 04 2012

Examples

			If n=22 (2 digits), f(n) = empty. If n=230 (3 digits), f(n)=20, f(f(n))=0. If n=301 (3 digits), f(n)=1 (1 digit), f(f(n))=empty.
The last 12 terms are: 999999333, 999999900, 999999901, 999999909, 999999912, 999999919, 999999920, 999999921, 999999922, 999999990, 999999991, 999999999.
		

Crossrefs

Cf. A038527.
Cf. A002024, A055642, A031298, subsequence of A138166.

Programs

  • Haskell
    import Data.List ((\\))
    a038528 n = a038528_list !! (n-1)
    a038528_list = gen ([1], 1) where
       gen (_, 10) = []
       gen (ds, len)
          | len `elem` ds && chi ds
            = foldr (\u v -> u + 10*v) 0 ds : gen (succ (ds, len))
          | otherwise = gen (succ (ds, len))
       chi xs = null ys || ys /= xs && chi ys where
                ys = tr $ filter (/= length xs) xs
                tr zs = if null zs || last zs > 0 then zs else tr $ init zs
       succ ([], len)   = ([1], len + 1)
       succ (d : ds, len)
           | d < len = (head (dropWhile (<= d) a002024_list \\ ds) : ds, len)
           | otherwise = (0 : ds', len') where (ds', len') = succ (ds, len)
    -- Reinhard Zumkeller, Jul 04 2012
  • Mathematica
    zeroQ[n_] :=  FixedPoint[ Function[{k}, DeleteCases[id = IntegerDigits[k], Length[id]] // FromDigits[#, 10]&], n] == 0; Select[Range[10^4], zeroQ] (* Jean-François Alcover, Dec 10 2014 *)

Formula

A054055(a(n)) = A055642(a(n)). - Reinhard Zumkeller, Jul 04 2012

A110745 a(n) is a number such that if odd positioned digits are deleted one gets n and if even positioned digits are deleted one gets n reversed. Counting is from the LSB side. The position of LSB is one.

Original entry on oeis.org

11, 22, 33, 44, 55, 66, 77, 88, 99, 1001, 1111, 1221, 1331, 1441, 1551, 1661, 1771, 1881, 1991, 2002, 2112, 2222, 2332, 2442, 2552, 2662, 2772, 2882, 2992, 3003, 3113, 3223, 3333, 3443, 3553, 3663, 3773, 3883, 3993, 4004, 4114, 4224, 4334, 4444, 4554
Offset: 1

Views

Author

Amarnath Murthy, Aug 10 2005

Keywords

Comments

Except for initial 0, rearrangement of numbers in A056524. They first differ at a(101) = 110011, while A056524(101) = 101101. If n has digits d_1 d_2 ... d_k, permute them to d_1 d_k d_2 d_{k-1} ... d_{floor(k/2)+1} and use that as index to A056524. - Franklin T. Adams-Watters, Jun 20 2006

Examples

			a(12) = 1221, deleting the LSB and the third digit 2 we get 12, deleting second and fourth digit we get 21.
		

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a110745 n = read (concat $ transpose [ns, reverse ns]) :: Integer
                where ns = show n
    -- Reinhard Zumkeller, Feb 14 2015

Extensions

More terms from Franklin T. Adams-Watters, Jun 20 2006

A249626 a(0) = 0, a(n+1) = smallest number, not occurring earlier, containing the smallest of the least frequently occurring digits in all preceding terms.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 34, 35, 36, 37, 38, 39, 40, 45, 46, 47, 48, 49, 50, 56, 57, 58, 59, 60, 67, 68, 69, 70, 78, 79, 80, 89, 90, 100, 21, 31, 41, 51, 61, 71, 81, 91, 22, 32, 42
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 03 2014

Keywords

Comments

a(n) = A102823(n) for n <= 55;
not all numbers occur: all repunits (A002275) greater than 1 are missing; idea of proof: for n > 1 the digit 1 will never again be the smallest of least frequently occurring digits;
A249648 gives positions of terms containing a zero.

Examples

			n = 11: digits 0 and 1 occur twice in {a(k): k=0..10}, all other digits exactly once, where 2 is the smallest; therefore a(11) must contain digit 2, and 12 is the smallest unused number containing 2, hence a(11) = 12.
n = 55: digits 0..9 occur exactly 10 times in {a(k): k=0..54}; therefore a(55) must contain digit 0, the smallest digit; a(55) = 100, as 100 is the smallest unused number containing 0;
n = 56: least occurring digits in {a(k): k=0..10} are 2..9 and 2 is the smallest; therefore a(56) must contain digit 2, and 21 is the smallest unused number containing 2, hence a(56) = 21.
		

Crossrefs

Programs

  • Haskell
    import Data.List (delete, group, sortBy); import Data.Function (on)
    a249626 n = a249626_list !! n
    a249626_list = f (zip [0,0..] [0..9]) a031298_tabf where
       f acds@((,dig):) zss = g zss where
         g (ys:yss) = if dig `elem` ys
                         then y : f acds' (delete ys zss) else g yss
           where y = foldr (\d v -> 10 * v + d) 0 ys
                 acds' = sortBy (compare `on` fst) $
                        addd (sortBy (compare `on` snd) acds)
                             (sortBy (compare `on` snd) $
                                     zip (map length gss) (map head gss))
                 addd cds [] = cds
                 addd []   _ = []
                 addd ((c, d) : cds) yys'@((cy, dy) : yys)
                      | d == dy  = (c + cy, d) : addd cds yys
                      | otherwise = (c, d) : addd cds yys'
                 gss = sortBy compare $ group ys

A251984 Smallest number such that a carry occurs when adding it to n in decimal representation.

Original entry on oeis.org

9, 8, 7, 6, 5, 4, 3, 2, 1, 90, 9, 8, 7, 6, 5, 4, 3, 2, 1, 80, 9, 8, 7, 6, 5, 4, 3, 2, 1, 70, 9, 8, 7, 6, 5, 4, 3, 2, 1, 60, 9, 8, 7, 6, 5, 4, 3, 2, 1, 50, 9, 8, 7, 6, 5, 4, 3, 2, 1, 40, 9, 8, 7, 6, 5, 4, 3, 2, 1, 30, 9, 8, 7, 6, 5, 4, 3, 2, 1, 20, 9, 8, 7, 6
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 12 2014

Keywords

Crossrefs

Programs

  • Haskell
    a251984 n = if d > 0 then 10 - d else 10 * a251984 n'
                where (n',d) = divMod n 10
    
  • Python
    def a(n):
        s = str(n)
        t = s.strip('0')
        return (10 - int(t)%10) * 10**(len(s) - len(t))
    print([a(n) for n in range(1, 85)]) # Michael S. Branicky, Sep 08 2021

Formula

a(n) = (10 - A004151(n) mod 10) * 10^A122840(n).

A257831 In decimal representation of n: replace each digit with its binary representation.

Original entry on oeis.org

0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 10, 11, 110, 111, 1100, 1101, 1110, 1111, 11000, 11001, 100, 101, 1010, 1011, 10100, 10101, 10110, 10111, 101000, 101001, 110, 111, 1110, 1111, 11100, 11101, 11110, 11111, 111000, 111001, 1000, 1001, 10010, 10011
Offset: 0

Views

Author

Reinhard Zumkeller, May 10 2015

Keywords

Comments

a(n) = n iff (largest digit of n) = 1: a(A007088(n)) = A007088(n);
a(n) = A007088(A080719(n)).

Examples

			.    n |  dec    -->  bin         |     a(n) |  A080719(n)
. -----+--------------------------+----------+------------
.  100 |  [1,0,0]  |  [1,0,0]     |     100  |          4
.  101 |  [1,0,1]  |  [1,0,1]     |     101  |          5
.  102 |  [1,0,2]  |  [1,0,10]    |    1010  |         10
.  103 |  [1,0,3]  |  [1,0,11]    |    1011  |         11
.  104 |  [1,0,4]  |  [1,0,100]   |   10100  |         20
.  105 |  [1,0,5]  |  [1,0,101]   |   10101  |         21
.  106 |  [1,0,6]  |  [1,0,110]   |   10110  |         22
.  107 |  [1,0,7]  |  [1,0,111]   |   10111  |         23
.  108 |  [1,0,8]  |  [1,0,1000]  |  101000  |         40
.  109 |  [1,0,9]  |  [1,0,1001]  |  101001  |         41
.  110 |  [1,1,0]  |  [1,1,0]     |     110  |          6
.  111 |  [1,1,1]  |  [1,1,1]     |     111  |          7
.  112 |  [1,1,2]  |  [1,1,10]    |    1110  |         14
.  113 |  [1,1,3]  |  [1,1,11]    |    1111  |         15
.  114 |  [1,1,4]  |  [1,1,100]   |   11100  |         28
.  115 |  [1,1,5]  |  [1,1,101]   |   11101  |         29
.  116 |  [1,1,6]  |  [1,1,110]   |   11110  |         30
.  117 |  [1,1,7]  |  [1,1,111]   |   11111  |         31
.  118 |  [1,1,8]  |  [1,1,1000]  |  111000  |         56
.  119 |  [1,1,9]  |  [1,1,1001]  |  111001  |         57
.  120 |  [1,2,0]  |  [1,10,0]    |    1100  |         12
.  121 |  [1,2,1]  |  [1,10,1]    |    1101  |         13
.  122 |  [1,2,2]  |  [1,10,10]   |   11010  |         26
.  123 |  [1,2,3]  |  [1,10,11]   |   11011  |         27
.  124 |  [1,2,4]  |  [1,10,100]  |  110100  |         52
.  125 |  [1,2,5]  |  [1,10,101]  |  110101  |         53  .
		

Crossrefs

Programs

  • Haskell
    import Data.Maybe (mapMaybe)
    a257831 = foldr (\b v -> 10 * v + b) 0 .
               concat . mapMaybe (flip lookup bin) . a031298_row
                where bin = zip [0..9] a030308_tabf
    
  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits[#,2]&/@IntegerDigits[n]]],{n,0,50}] (* Harvey P. Dale, Jun 06 2020 *)
  • Python
    def A257831(n):
        return int(''.join((format(int(d),'b') for d in str(n))))
    # Chai Wah Wu, May 10 2015

A265525 a(n) = largest base-10 palindrome m <= n such that every base-10 digit of m is <= the corresponding digit of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 11, 22, 22, 22, 22, 22, 22, 22, 22, 0, 11, 22, 33, 33, 33, 33, 33, 33, 33, 0, 11, 22, 33, 44, 44, 44, 44, 44, 44, 0, 11, 22, 33, 44, 55, 55, 55, 55, 55, 0, 11, 22, 33, 44, 55, 66, 66, 66, 66, 0, 11, 22, 33, 44, 55, 66, 77, 77, 77, 0, 11, 22, 33
Offset: 0

Views

Author

N. J. A. Sloane, Dec 09 2015

Keywords

Crossrefs

Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.

Programs

  • Haskell
    a265525 n = a265525_list !! n
    a265525_list = f a031298_tabf [[]] where
       f (ds:dss) pss = y : f dss pss' where
         y = foldr (\d v -> 10 * v + d) 0 ys
         (ys:_) = dropWhile (\ps -> not $ and $ zipWith (<=) ps ds) pss'
         pss' = if ds /= reverse ds then pss else ds : pss
    -- Reinhard Zumkeller, Dec 11 2015
  • Maple
    ispal := proc(n) # test for base-b palindrome
    local L, Ln, i;
    global b;
    L := convert(n, base, b);
    Ln := nops(L);
    for i to floor(1/2*Ln) do
    if L[i] <> L[Ln + 1 - i] then return false end if
    end do;
    return true
    end proc
    # find max pal <= n and in base-b shadow of n, write in base 10
    under10:=proc(n) global b;
    local t1,t2,i,m,sw1,L2;
    if n mod b = 0 then return(0); fi;
    t1:=convert(n,base,b);
    for m from n by -1 to 0 do
    if ispal(m) then
    t2:=convert(m,base,b);
    L2:=nops(t2);
    sw1:=1;
    for i from 1 to L2 do
    if t2[i] > t1[i] then sw1:=-1; break; fi;
    od:
    if sw1=1 then return(m); fi;
    fi;
    od;
    end proc;
    b:=10; [seq(under10(n),n=0..144)]; # Gives A265525
Previous Showing 31-40 of 40 results.