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

A052383 Numbers without 1 as a digit.

Original entry on oeis.org

0, 2, 3, 4, 5, 6, 7, 8, 9, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89
Offset: 1

Views

Author

Henry Bottomley, Mar 13 2000

Keywords

Comments

For each k in {1, 2, ..., 29, 30, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43} there exists at least an m such that m^k is 1-less. If m^k is 1-less then (10*m)^k, (100*m)^k, (1000*m)^k, ... are also 1-less. Therefore for each of these numbers k there exist infinitely many k-th powers in this sequence. - Mohammed Yaseen, Apr 17 2023

Crossrefs

Cf. A004176, A004720, A011531 (complement), A038603 (subset of primes), A082830 (Kempner series), A248518, A248519.
Cf. A052382 (without 0), A052404 (without 2), A052405 (without 3), A052406 (without 4), A052413 (without 5), A052414 (without 6), A052419 (without 7), A052421 (without 8), A007095 (without 9).

Programs

  • Haskell
    a052383 = f . subtract 1 where
       f 0 = 0
       f v = 10 * f w + if r > 0 then r + 1 else 0  where (w, r) = divMod v 9
    -- Reinhard Zumkeller, Oct 07 2014
    
  • Magma
    [ n: n in [0..89] | not 1 in Intseq(n) ];  // Bruno Berselli, May 28 2011
    
  • Maple
    M:= 3: # to get all terms with up to M digits
    B:= {$2..9}: A:= B union {0}:
    for m from 1 to M do
    B:= map(b -> seq(10*b+j,j={0,$2..9}), B);
    A:= A union B;
    od:
    sort(convert(A,list)); # Robert Israel, Jan 11 2016
    # second program:
    A052383 := proc(n)
          option remember;
          if n = 1 then
            0;
        else
            for a from procname(n-1)+1 do
                if nops(convert(convert(a,base,10),set) intersect {1}) = 0 then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jul 31 2016
    # third Maple program:
    a:= proc(n) local l, m; l, m:= 0, n-1;
          while m>0 do l:= (d->
            `if`(d=0, 0, d+1))(irem(m, 9, 'm')), l
          od; parse(cat(l))/10
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 01 2016
  • Mathematica
    ban1Q[n_] := FreeQ[IntegerDigits[n], 1] == True; Select[Range[0, 89], ban1Q[#] &] (* Jayanta Basu, May 17 2013 *)
    Select[Range[0, 99], DigitCount[#, 10, 1] == 0 &] (* Alonso del Arte, Jan 12 2020 *)
  • PARI
    a(n)=my(v=digits(n,9));for(i=1,#v,if(v[i],v[i]++));subst(Pol(v),'x,10) \\ Charles R Greathouse IV, Oct 04 2012
    
  • PARI
    apply( {A052383(n)=fromdigits(apply(d->d+!!d, digits(n-1, 9)))}, [1..99]) \\ Defines the function and computes it for indices 1..99 (check & illustration)
    select( {is_A052383(n)=!setsearch(Set(digits(n)), 1)}, [0..99]) \\ Define the characteristic function is_A; as illustration, select the terms in [0..99]
    next_A052383(n, d=digits(n+=1))={for(i=1, #d, d[i]==1&& return((1+n\d=10^(#d-i))*d)); n} \\ Successor function: efficiently skip to the next a(k) > n. Used in A038603.  - M. F. Hasler, Jan 11 2020
    
  • Python
    from itertools import count, islice, product
    def A052383(): # generator of terms
        yield 0
        for digits in count(1):
            for f in "23456789":
                for r in product("023456789", repeat=digits-1):
                    yield int(f+"".join(r))
    print(list(islice(A052383(), 72))) # Michael S. Branicky, Oct 15 2023
    
  • Python
    from gmpy2 import digits
    def A052383(n): return int(''.join(str(int(d)+(d!='0')) for d in digits(n-1,9))) # Chai Wah Wu, Jun 28 2025
  • Scala
    (0 to 99).filter(.toString.indexOf('1') == -1) // _Alonso del Arte, Jan 12 2020
    
  • sh
    seq 0 1000 | grep -v 1; # Joerg Arndt, May 29 2011
    

Formula

a(1) = 1, a(n + 1) = f(a(n) + 1, a(n) + 1) where f(x, y) = if x < 10 and x <> 1 then y else if x mod 10 = 1 then f(y + 1, y + 1) else f(floor(x/10), y). - Reinhard Zumkeller, Mar 02 2008
a(n) is the replacement of all nonzero digits d by d + 1 in the base-9 representation of n - 1. - Reinhard Zumkeller, Oct 07 2014
Sum_{k>1} 1/a(k) = A082830 = 16.176969... (Kempner series). - Bernard Schott, Jan 12 2020

Extensions

Offset changed by Reinhard Zumkeller, Oct 07 2014

A004721 Delete all 2's from the sequence of nonnegative integers.

Original entry on oeis.org

0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 13, 14, 15, 16, 17, 18, 19, 0, 1, 3, 4, 5, 6, 7, 8, 9, 30, 31, 3, 33, 34, 35, 36, 37, 38, 39, 40, 41, 4, 43, 44, 45, 46, 47, 48, 49, 50, 51, 5, 53, 54, 55, 56, 57, 58, 59, 60, 61, 6, 63, 64, 65, 66, 67, 68, 69, 70, 71, 7, 73, 74, 75
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    d[n_]:=IntegerDigits[n]; t={0}; Do[If[Union[d[n]]!={2},n=FromDigits[DeleteCases[d[n],2]]; AppendTo[t,n]],{n,75}]; t (* Jayanta Basu, May 17 2013 *)
  • Python
    def A004721(n):
        l = len(str(n))
        m = 2*(10**l-1)//9
        k = n + l - int(n+l < m)
        return 1 if k == m else int(str(k).replace('2','')) # Chai Wah Wu, Apr 20 2021

A004722 Delete all digits 3 from the terms of the sequence of nonnegative integers.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 2, 24, 25, 26, 27, 28, 29, 0, 1, 2, 4, 5, 6, 7, 8, 9, 40, 41, 42, 4, 44, 45, 46, 47, 48, 49, 50, 51, 52, 5, 54, 55, 56, 57, 58, 59, 60, 61, 62, 6, 64, 65, 66, 67, 68, 69, 70, 71, 72, 7, 74, 75, 76
Offset: 0

Views

Author

Keywords

Comments

Very similar to A004178, except that 3-repdigits (A002277) are completely removed from the sequence, whereas A004178 has 0's in their place. It is thus guaranteed that a(n) = n only when n < 3. - Alonso del Arte, Oct 18 2012

Crossrefs

Programs

  • MATLAB
    m=1;
    for u=0:1000
        v=dec2base(u,10)-'0'; v = v(v~=3);
        if length(v)>0;sol(m)=(str2num(strrep(num2str(v), ' ', ''))); m=m+1; end;
    end
    sol % Marius A. Burtea, May 07 2019
    
  • Mathematica
    endAt = 103; Delete[Table[FromDigits[DeleteCases[IntegerDigits[n], 3]], {n, 0, endAt}], Table[{(10^expo - 1)/3 + 1}, {expo, Floor[Log[10, endAt]]}]] (* Alonso del Arte, Apr 29 2019 *)
  • Python
    def A004722(n):
        l = len(str(n))
        m = (10**l-1)//3
        k = n + l - int(n+l < m)
        return 2 if k == m else int(str(k).replace('3','')) # Chai Wah Wu, Apr 20 2021

Formula

a(n) = n for -1 < n < 3;
a(n) = A004178(n + 1) for 2 < n < 32,
a(n) = A004178(n + 2) for 31 < n < 331,
a(n) = A004178(n + 3) for 330 < n < 3330,
a(n) = A004178(n + 4) for 3329 < n < 33329, etc. - Alonso del Arte, Oct 21 2012

Extensions

Sean A. Irvine pointed out erroneous terms in b-file and confirmed correction, Apr 28 2019
Name edited by Felix Fröhlich, Apr 29 2019

A004724 Delete all 5's from the sequence of nonnegative integers.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1, 16, 17, 18, 19, 20, 21, 22, 23, 24, 2, 26, 27, 28, 29, 30, 31, 32, 33, 34, 3, 36, 37, 38, 39, 40, 41, 42, 43, 44, 4, 46, 47, 48, 49, 0, 1, 2, 3, 4, 6, 7, 8, 9, 60, 61, 62, 63, 64, 6, 66, 67, 68, 69, 70, 71, 72, 73, 74, 7, 76
Offset: 0

Views

Author

Keywords

Comments

In contrast to the variant A004180 where a(n) = 0 when all the digits of n are 5's, here a number completely disappears in that case, so that subsequent indices are shifted and for n > 4, a(n) is not the result of deleting 5's from n: see formula. - M. F. Hasler, Jan 13 2020

Examples

			From  _M. F. Hasler_, Jan 13 2020: (Start)
After a(4) = 4 comes a(5) = 6, since the number 5 completely disappears.
a(48) = 49 is followed by 0, 1, 2, 3, 4 (i.e., 50, ..., 54 with the initial digit removed) and then a(54) = 6, because 55 disappears completely.
Illustration of the formula: as long as n < 5 (the first number that completely disappears) we have a(n) = A004180(n). Here n has 1 digit but n+1 does not exceed the (single repdigit) 5 (left hand side in the Iverson bracket), so m = 0. From n = 5 on, n+1 > 5, so m = 1.
Then, when n has L(n) = 2 digits, we still have n = 2 - 1 = 1 as long as n+2 <= 55 or n <= 53, but m = 3 for n > 55 - 2 = 53, i.e., from n = 54 on (where the term 55 has disappeared, see above).
Similarly, m = 3 for n > 555 - 3, i.e., from n >= 553 on, etc. (End)
		

Crossrefs

Cf. A004180 (delete digits 5 in n), A052413 (numbers with no digit 5).

Programs

  • MATLAB
    m=1; for u=0:76 v=dec2base(u, 10)-'0'; v = v(v~=5);  if length(v)>0; sol(m)=(str2num(strrep(num2str(v), ' ', ''))); m=m+1; end; end; sol % Marius A. Burtea, Jan 16 2020
    
  • PARI
    apply( {A004724(n,L=logint(n+!n,10)+1)=A004180(n+L-(10^L\9*5-L>=n))}, [0..99])
    A004724_upto(N)={[fromdigits(v)|v<-[[d|d<-digits(n+!n*50),d!=5]|n<-[0..N]],#v]} \\ M. F. Hasler, Jan 13 2020
    
  • Python
    def A004724(n):
        l = len(str(n))
        m = 5*(10**l-1)//9
        k = n + l - int(n+l < m)
        return 4 if k == m else int(str(k).replace('5','')) # Chai Wah Wu, Apr 20 2021

Formula

a(n) = A004180(n + m) where m = L(n) - [ (10^L(n)-1)/9*5 >= n + L(n) ], L(n) = floor(log_10(max(n,1)) + 1), the number of digits of n, and [...] is the Iverson bracket (1 if true, 0 else). - M. F. Hasler, Jan 13 2020

A004723 Delete all 4's from the sequence of nonnegative integers.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1, 15, 16, 17, 18, 19, 20, 21, 22, 23, 2, 25, 26, 27, 28, 29, 30, 31, 32, 33, 3, 35, 36, 37, 38, 39, 0, 1, 2, 3, 5, 6, 7, 8, 9, 50, 51, 52, 53, 5, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 65, 66, 67, 68, 69, 70, 71, 72, 73, 7, 75
Offset: 0

Views

Author

Keywords

Comments

Differs from A004179 where A004179(4) = A004179(44) = A004179(444) = ... = 0. - Michel Marcus, May 17 2019

Crossrefs

Programs

  • MATLAB
    m=1;
    for u=0:150
    v=dec2base(u, 10)-'0'; v = v(v~=4);
      if length(v)>0;sol(m)=(str2num(strrep(num2str(v), ' ', ''))); m=m+1; end;
    end;
    sol % Marius A. Burtea, May 17 2019
    
  • Maple
    f:= proc(n) local L,i;
      L:= subs(4=NULL, convert(n,base,10));
      if L = [] then return NULL fi;
      add(L[i]*10^(i-1),i=1..nops(L))
    end proc:
    map(f, [$0..100]); # Robert Israel, May 17 2019
  • Python
    def A004723(n):
        l = len(str(n))
        m = 4*(10**l-1)//9
        k = n + l - int(n+l < m)
        return 3 if k == m else int(str(k).replace('4','')) # Chai Wah Wu, Apr 20 2021

A004725 Delete all 6's from the sequence of nonnegative integers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 17, 18, 19, 20, 21, 22, 23, 24, 25, 2, 27, 28, 29, 30, 31, 32, 33, 34, 35, 3, 37, 38, 39, 40, 41, 42, 43, 44, 45, 4, 47, 48, 49, 50, 51, 52, 53, 54, 55, 5, 57, 58, 59, 0, 1, 2, 3, 4, 5, 7, 8, 9, 70, 71, 72, 73, 74, 75, 7
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    d6[n_]:=Module[{c=DeleteCases[IntegerDigits[n],6]},If[c=={},Nothing, FromDigits[ c]]]; Array[d6,80,0] (* Harvey P. Dale, Oct 09 2017 *)
  • Python
    def A004725(n):
        l = len(str(n))
        m = 2*(10**l-1)//3
        k = n + l - int(n+l < m)
        return 5 if k == m else int(str(k).replace('6','')) # Chai Wah Wu, Apr 20 2021

A004726 Delete all 7's from the sequence of nonnegative integers.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Delete[Table[FromDigits[IntegerDigits[n]/.(7->Nothing)],{n,0,80}],8] (* Harvey P. Dale, Jul 13 2025 *)
  • Python
    def A004726(n):
        l = len(str(n))
        m = 7*(10**l-1)//9
        k = n + l - int(n+l < m)
        return 6 if k == m else int(str(k).replace('7','')) # Chai Wah Wu, Apr 20 2021

A004727 Delete all 8's from the sequence of nonnegative integers.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Python
    def A004727(n):
        l = len(str(n))
        m = 8*(10**l-1)//9
        k = n + l - int(n+l < m)
        return 7 if k == m else int(str(k).replace('8','')) # Chai Wah Wu, Apr 20 2021

A004728 Delete all 9's from the sequence of nonnegative integers.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{0},Table[FromDigits[IntegerDigits[n]/.(9->Nothing)],{n,90}]/.(0-> Nothing)] (* Harvey P. Dale, Aug 10 2019 *)
  • Python
    def A004728(n):
        l = len(str(n))
        m = 10**l-1
        k = n + l - int(n+l < m)
        return 8 if k == m else int(str(k).replace('9','')) # Chai Wah Wu, Apr 20 2021

A004176 Omit 1's from n.

Original entry on oeis.org

0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 20, 2, 22, 23, 24, 25, 26, 27, 28, 29, 30, 3, 32, 33, 34, 35, 36, 37, 38, 39, 40, 4, 42, 43, 44, 45, 46, 47, 48, 49, 50, 5, 52, 53, 54, 55, 56, 57, 58, 59, 60, 6, 62, 63, 64, 65, 66, 67, 68, 69, 70, 7, 72, 73, 74
Offset: 0

Views

Author

Keywords

Comments

a(210) = 20 is the first term that differs from the variant "strip any leading or trailing digits 1 from n" [where digits 1 "protected" on both sides by digits different from 1 would be preserved]. Up to there, if a(n) is palindromic, then n is not in A359510, but if a(n) is non-palindromic and n is prime, then n is in A359510. - M. F. Hasler, Jan 23 2023

Crossrefs

See A004720 for another version.
Cf. A359510 (numbers that can't be written as a palindromic product).

Programs

  • Mathematica
    Table[FromDigits[DeleteCases[IntegerDigits[n],1]],{n,0,3000}] (* Zak Seidov, Dec 08 2010 *)
  • PARI
    a(n) = fromdigits(select(d -> d!=1, digits(n))) \\ Rémy Sigrist, Jul 13 2019
    
  • Python
    def A004176(n): return int(s) if (s:=str(n).replace('1','')) else 0 # M. F. Hasler, Jan 23 2023
Showing 1-10 of 10 results.