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

A052413 Numbers without 5 as a digit.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 13 2000

Keywords

Crossrefs

Cf. A004180, A004724, A038613 (subset of primes), A082834 (Kempner series).
Cf. A052382 (without 0), A052383 (without 1), A052404 (without 2), A052405 (without 3), A052406 (without 4), A052414 (without 6), A052419 (without 7), A052421 (without 8), A007095 (without 9).

Programs

  • Haskell
    a052413 = f . subtract 1 where
    f 0 = 0
    f v = 10 * f w + if r > 4 then r + 1 else r where (w, r) = divMod v 9
    -- Reinhard Zumkeller, Oct 07 2014
    
  • Magma
    [ n: n in [0..89] | not 5 in Intseq(n) ]; // Bruno Berselli, May 28 2011
    
  • Maple
    a:= proc(n) local l, m; l, m:= 0, n-1;
          while m>0 do l:= (d->
            `if`(d<5, d, 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
    Select[Range[100],!MemberQ[IntegerDigits[#],5]&] (* Harvey P. Dale, Feb 20 2013 *)
  • PARI
    apply( {A052413(n)=fromdigits(apply(d->d+(d>4),digits(n-1,9)))}, [1..99]) \\ a(n)
    select( {is_A052413(n)=!setsearch(Set(digits(n)),5)}, [0..99]) \\ used in A038613
    next_A052413(n, d=digits(n+=1))={for(i=1,#d, d[i]==5&&return((1+n\d=10^(#d-i))*d)); n} \\ least a(k) > n; used in A038613. - M. F. Hasler, Jan 11 2020
    
  • Python
    # see the OEIS wiki page (cf. LINKS) for more programs
    def A052413(n): n-=1; return sum(n//9**e%9*6//5*10**e for e in range(math.ceil(math.log(n+1,9)))) # M. F. Hasler, Jan 13 2020
    
  • Python
    from gmpy2 import digits
    def A052413(n): return int(digits(n-1,9).translate(str.maketrans('5678','6789'))) # Chai Wah Wu, Jun 28 2025
  • sh
    seq 0 1000 | grep -v 5; # Joerg Arndt, May 29 2011
    

Formula

a(n) = replace digits d > 4 by d + 1 in base-9 representation of n - 1. - Reinhard Zumkeller, Oct 07 2014
Sum_{k>1} 1/a(n) = A082834 = 21.8346008... (Kempner series). - Bernard Schott, Jan 12 2020, edited by M. F. Hasler, Jan 13 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

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

A004180 Omit 5's from n.

Original entry on oeis.org

0, 1, 2, 3, 4, 0, 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, 0, 6, 7, 8, 9, 60, 61, 62, 63, 64, 6, 66, 67, 68, 69, 70, 71, 72, 73, 74
Offset: 0

Views

Author

Keywords

Comments

See A004724 for a variant where a(n) disappears when n has only digits 5. - M. F. Hasler, Jan 13 2020

Crossrefs

Cf. A004724.

Programs

  • MATLAB
    for u=0:74 ; v=dec2base(u, 10)-'0'; v = v(v~=5); if length(v)>0; sol(u+1)=(str2num(strrep(num2str(v), ' ', ''))); else; sol(u+1)=0; end; end; sol % Marius A. Burtea, Jan 13 2020
  • Mathematica
    Table[FromDigits[DeleteCases[IntegerDigits[n], 5]], {n, 0, 79}] (* Harvey P. Dale, Jan 20 2015 *)
  • PARI
    a(n)=subst(Pol(select(k->k-5,digits(n))),'x,10) \\ Charles R Greathouse IV, Oct 16 2012
    
  • PARI
    A004180(n)=fromdigits([d|d<-digits(n),d!=5]) \\ M. F. Hasler, Jan 13 2020
    
  • Scala
    (0 to 99).map(n => try {
      Integer.parseInt(Integer.toString(n).replace("5", ""))
    } catch {
      case _: NumberFormatException => 0
    }) // Alonso del Arte, Jan 13 2020
    
Showing 1-9 of 9 results.