The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052383 Numbers without 1 as a digit. 29
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
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
LINKS
M. F. Hasler, Numbers avoiding certain digits, OEIS Wiki, Jan 12 2020.
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
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 *)
PROG
(Magma) [ n: n in [0..89] | not 1 in Intseq(n) ]; // Bruno Berselli, May 28 2011
(sh) seq 0 1000 | grep -v 1; # Joerg Arndt, May 29 2011
(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
(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
(Scala) (0 to 99).filter(_.toString.indexOf('1') == -1) // Alonso del Arte, Jan 12 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
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).
Sequence in context: A039077 A247803 A362093 * A110803 A109795 A248500
KEYWORD
base,easy,nonn
AUTHOR
Henry Bottomley, Mar 13 2000
EXTENSIONS
Offset changed by Reinhard Zumkeller, Oct 07 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 19:55 EDT 2024. Contains 372919 sequences. (Running on oeis4.)