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-5 of 5 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

A004720 Delete all digits '1' from the sequence of nonnegative integers.

Original entry on oeis.org

0, 2, 3, 4, 5, 6, 7, 8, 9, 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, 75
Offset: 1

Views

Author

Keywords

Comments

Similar to A004176. - R. J. Mathar, Oct 28 2008
More precisely, in A004176 the term becomes 0 if no digit remains, e.g., for 1 or 11, whereas here in such a case the integer is completely skipped (as in A004719, A004721, ... which are the analogs for deleting 0, 2, ...). - M. F. Hasler, Feb 01 2016

Examples

			The first nonnegative integer, 0, remains as a(1).
The second nonnegative integer, 1, completely disappears upon removal of the digit 1.
The third nonnegative integer, 2, remains as a(2).
The number 10 becomes a(10)=0.
The number 11 completely disappears upon removal of both its digits '1'.
The number 12 becomes a(11)=2.
		

Crossrefs

See A004176 for another version.
Cf. A004719, A004721, ...

Programs

  • Maple
    f:= proc(n) local L,i;
         L:= subs(1=NULL, convert(n,base,10));
         if L = [] then NULL
         else add(L[i]*10^(i-1),i=1..nops(L))
         fi
    end proc:
    map(f, [$0..100]); # Robert Israel, Feb 07 2016
  • Mathematica
    f[n_] := Block[{a = DeleteCases[ IntegerDigits[n], 1]}, If[a != {}, FromDigits@ a, b]]; DeleteCases[ Array[f, 75, 0], b] (* Robert G. Wilson v, Feb 05 2016 *)
  • PARI
    for(n=0,99,if(t=select(d->d!="1",Vec(Str(n))),print1(concat(t)","))) \\ M. F. Hasler, Feb 01 2016
    
  • Python
    def A004720(n):
        l = len(str(n-1))
        m = (10**l-1)//9
        k = n + l - 2 + int(n+l-1 >= m)
        return 0 if k == m else int(str(k).replace('1','')) # Chai Wah Wu, Apr 20 2021

Extensions

Corrected by T. D. Noe, Sep 19 2008
Entry revised by N. J. A. Sloane and M. F. Hasler following a suggestion from Sean A. Irvine, Feb 01 2016

A004177 Omit 2's from n.

Original entry on oeis.org

0, 1, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 13, 14, 15, 16, 17, 18, 19, 0, 1, 0, 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
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local L,i;
         L:= subs(2=NULL,convert(n,base,10));
         add(L[i]*10^(i-1),i=1..nops(L))
    end proc:
    map(f, [$0..100]); # Robert Israel, Sep 15 2024
  • Mathematica
    Table[FromDigits[DeleteCases[IntegerDigits[n],2]],{n,0,80}] (* Harvey P. Dale, Feb 12 2022 *)

A176407 Omit all 1's and 2's from n.

Original entry on oeis.org

0, 0, 0, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 3, 4, 5, 6, 7, 8, 9, 30, 3, 3, 33, 34, 35, 36, 37, 38, 39, 40, 4, 4, 43, 44, 45, 46, 47, 48, 49, 50, 5, 5, 53, 54, 55, 56, 57, 58, 59, 60, 6, 6, 63, 64, 65, 66, 67, 68, 69, 70, 7, 7, 73, 74, 75, 76, 77, 78, 79, 80, 8, 8, 83, 84, 85, 86, 87, 88, 89, 90, 9, 9, 93, 94, 95, 96, 97, 98, 99, 0, 0, 0, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 3, 4
Offset: 0

Views

Author

Zak Seidov, Dec 07 2010

Keywords

Crossrefs

Cf. A004176 (Omit 1's from n), A004177 (Omit 2's from n).

Programs

  • Mathematica
    Table[FromDigits[DeleteCases[IntegerDigits[n], 1 | 2]], {n, 300}]
  • PARI
    a(n) = fromdigits(select(x->((x!=1) && (x!=2)), digits(n))); \\ Michel Marcus, Sep 17 2017

A359510 Numbers that can't be written as a palindromic product, i.e., such that the concatenation of all digits of the factors yields a palindrome.

Original entry on oeis.org

23, 26, 29, 30, 34, 35, 37, 38, 43, 47, 53, 57, 59, 62, 65, 67, 70, 73, 74, 79, 82, 83, 85, 86, 87, 89, 92, 94, 95, 97, 103, 106, 107, 109, 123, 127, 130, 134, 137, 139, 140, 142, 145, 146, 148, 149, 152, 157, 158, 163, 167, 170, 173, 174, 178, 179, 182, 183, 185, 190, 193, 194, 197
Offset: 1

Views

Author

M. F. Hasler and Eric Angelini, Jan 03 2023

Keywords

Comments

Any number of factors 1 is allowed anywhere in the product.
The sequence contains all primes which are not palindromic when stripped of digits '1' on either side (for example 23, 29, 37, but not 13, 17, 19, 31 which can be written as 13*1, 17*1, 19*1, 1*31, etc., where the concatenation of all digits, "131", "171", ... is palindromic).

Examples

			Any palindrome is trivially a palindromic product and therefore not in the sequence. Also not in the sequence are 10 = 10*1, 12 = 12*1, ..., 20 = 2*5*2, 21 = 1*21. Therefore the first term is a(1) = 23.
		

Crossrefs

Cf. A002113 (palindromes in base 10), A029742 (non-palindromes), A334321 (non-palindromic primes), A004176 (omit digits 1).
Showing 1-5 of 5 results.