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.

A052383 Numbers without 1 as a digit.

This page as a plain text file.
%I A052383 #98 Jun 28 2025 15:46:52
%S A052383 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,
%T A052383 39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,57,58,59,60,62,63,64,
%U A052383 65,66,67,68,69,70,72,73,74,75,76,77,78,79,80,82,83,84,85,86,87,88,89
%N A052383 Numbers without 1 as a digit.
%C A052383 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
%H A052383 Reinhard Zumkeller, <a href="/A052383/b052383.txt">Table of n, a(n) for n = 1..10000</a>
%H A052383 M. F. Hasler, <a href="/wiki/Numbers_avoiding_certain_digits">Numbers avoiding certain digits</a>, OEIS Wiki, Jan 12 2020.
%H A052383 <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.
%F A052383 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
%F A052383 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
%F A052383 Sum_{k>1} 1/a(k) = A082830 = 16.176969... (Kempner series). - _Bernard Schott_, Jan 12 2020
%p A052383 M:= 3: # to get all terms with up to M digits
%p A052383 B:= {$2..9}: A:= B union {0}:
%p A052383 for m from 1 to M do
%p A052383 B:= map(b -> seq(10*b+j,j={0,$2..9}), B);
%p A052383 A:= A union B;
%p A052383 od:
%p A052383 sort(convert(A,list)); # _Robert Israel_, Jan 11 2016
%p A052383 # second program:
%p A052383 A052383 := proc(n)
%p A052383       option remember;
%p A052383       if n = 1 then
%p A052383         0;
%p A052383     else
%p A052383         for a from procname(n-1)+1 do
%p A052383             if nops(convert(convert(a,base,10),set) intersect {1}) = 0 then
%p A052383                 return a;
%p A052383             end if;
%p A052383         end do:
%p A052383     end if;
%p A052383 end proc: # _R. J. Mathar_, Jul 31 2016
%p A052383 # third Maple program:
%p A052383 a:= proc(n) local l, m; l, m:= 0, n-1;
%p A052383       while m>0 do l:= (d->
%p A052383         `if`(d=0, 0, d+1))(irem(m, 9, 'm')), l
%p A052383       od; parse(cat(l))/10
%p A052383     end:
%p A052383 seq(a(n), n=1..100);  # _Alois P. Heinz_, Aug 01 2016
%t A052383 ban1Q[n_] := FreeQ[IntegerDigits[n], 1] == True; Select[Range[0, 89], ban1Q[#] &] (* _Jayanta Basu_, May 17 2013 *)
%t A052383 Select[Range[0, 99], DigitCount[#, 10, 1] == 0 &] (* _Alonso del Arte_, Jan 12 2020 *)
%o A052383 (Magma) [ n: n in [0..89] | not 1 in Intseq(n) ];  // _Bruno Berselli_, May 28 2011
%o A052383 (sh) seq 0 1000 | grep -v 1; # _Joerg Arndt_, May 29 2011
%o A052383 (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
%o A052383 (PARI)
%o A052383 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)
%o A052383 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]
%o A052383 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
%o A052383 (Haskell)
%o A052383 a052383 = f . subtract 1 where
%o A052383    f 0 = 0
%o A052383    f v = 10 * f w + if r > 0 then r + 1 else 0  where (w, r) = divMod v 9
%o A052383 -- _Reinhard Zumkeller_, Oct 07 2014
%o A052383 (Scala) (0 to 99).filter(_.toString.indexOf('1') == -1) // _Alonso del Arte_, Jan 12 2020
%o A052383 (Python)
%o A052383 from itertools import count, islice, product
%o A052383 def A052383(): # generator of terms
%o A052383     yield 0
%o A052383     for digits in count(1):
%o A052383         for f in "23456789":
%o A052383             for r in product("023456789", repeat=digits-1):
%o A052383                 yield int(f+"".join(r))
%o A052383 print(list(islice(A052383(), 72))) # _Michael S. Branicky_, Oct 15 2023
%o A052383 (Python)
%o A052383 from gmpy2 import digits
%o A052383 def A052383(n): return int(''.join(str(int(d)+(d!='0')) for d in digits(n-1,9))) # _Chai Wah Wu_, Jun 28 2025
%Y A052383 Cf. A004176, A004720, A011531 (complement), A038603 (subset of primes), A082830 (Kempner series), A248518, A248519.
%Y A052383 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).
%K A052383 base,easy,nonn
%O A052383 1,2
%A A052383 _Henry Bottomley_, Mar 13 2000
%E A052383 Offset changed by _Reinhard Zumkeller_, Oct 07 2014