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.

A052405 Numbers without 3 as a digit.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 13 2000

Keywords

Comments

This sequence also represents the minimal number of straight lines of a covering tree to cover n X n points arranged in a symmetrical grid. - Marco RipĂ , Sep 20 2018

Examples

			22 has no 3s among its digits, hence it is in the sequence.
23 has one 3 among its digits, hence it is not in the sequence.
		

Crossrefs

Cf. A004178, A004722, A038611 (subset of primes), A082832 (Kempner series).
Cf. A052382 (without 0), A052383 (without 1), A052404 (without 2), A052406 (without 4), A052413 (without 5), A052414 (without 6), A052419 (without 7), A052421 (without 8), A007095 (without 9).
Cf. A011533 (complement).

Programs

  • Haskell
    a052405 = f . subtract 1 where
       f 0 = 0
       f v = 10 * f w + if r > 2 then r + 1 else r  where (w, r) = divMod v 9
    -- Reinhard Zumkeller, Oct 07 2014
    
  • Magma
    [ n: n in [0..89] | not 3 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<3, 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[0, 89], DigitCount[#, 10, 3] == 0 &] (* Alonso del Arte, Oct 16 2012 *)
  • PARI
    is(n)=n=digits(n);for(i=1,#n,if(n[i]==3,return(0)));1 \\ Charles R Greathouse IV, Oct 16 2012
    apply( {A052405(n)=fromdigits(apply(d->d+(d>2),digits(n-1,9)))}, [1..99]) \\ a(n)
    next_A052405(n, d=digits(n+=1))={for(i=1, #d, d[i]==3&& return((1+n\d=10^(#d-i))*d)); n} \\ least a(k) > n. Used in A038611. \\ M. F. Hasler, Jan 11 2020
    
  • Python
    from gmpy2 import digits
    def A052405(n): return int(digits(n-1,9).translate(str.maketrans('345678','456789'))) # Chai Wah Wu, Jun 28 2025
  • sh
    seq 0 1000 | grep -v 3; # Joerg Arndt, May 29 2011
    

Formula

a(n) >> n^k with k = log(10)/log(9) = 1.0479.... - Charles R Greathouse IV, Oct 16 2012
a(n) = replace digits d > 2 by d + 1 in base-9 representation of n - 1. - Reinhard Zumkeller, Oct 07 2014
Sum_{n>1} 1/a(n) = A082832 = 20.569877... (Kempner series). - Bernard Schott, Jan 12 2020, edited by M. F. Hasler, Jan 14 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

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

A004178 Omit 3's from n.

Original entry on oeis.org

0, 1, 2, 0, 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, 0, 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
Offset: 0

Views

Author

Keywords

Comments

a(n) = 0 when n = 0 or when n is a 3-repdigit (A002277). a(n) = n when it contains no 3 among its digits. - Alonso del Arte, Oct 16 2012

Examples

			a(13) = 1 because after deleting the 3 from its base 10 representation, we're left with 1.
a(14) = 14 because there are no 3s to delete.
		

Crossrefs

Programs

  • Mathematica
    Table[FromDigits[DeleteCases[IntegerDigits[n], 3]], {n, 0, 74}] (* Alonso del Arte, Oct 16 2012 *)
  • PARI
    a(n)=subst(Pol(select(k->k-3,digits(n))),'x,10) \\ Charles R Greathouse IV, Oct 16 2012
Showing 1-9 of 9 results.