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.
%I A052421 #40 Jun 28 2025 15:47:18 %S A052421 0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,17,19,20,21,22,23,24,25,26,27, %T A052421 29,30,31,32,33,34,35,36,37,39,40,41,42,43,44,45,46,47,49,50,51,52,53, %U A052421 54,55,56,57,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,79 %N A052421 Numbers without 8 as a digit. %H A052421 Reinhard Zumkeller, <a href="/A052421/b052421.txt">Table of n, a(n) for n = 1..10000</a> %H A052421 M. F. Hasler, <a href="/wiki/Numbers_avoiding_certain_digits">Numbers avoiding certain digits</a>, OEIS wiki, Jan 12 2020. %H A052421 <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>. %F A052421 a(n) = replace digits d > 7 by d + 1 in base-9 representation of n - 1. - _Reinhard Zumkeller_, Oct 07 2014 %F A052421 Sum_{n>1} 1/a(n) = A082837 = 22.726365... (Kempner series). - _Bernard Schott_, Jan 12 2020, edited by _M. F. Hasler_, Jan 13 2020 %p A052421 a:= proc(n) local l, m; l, m:= 0, n-1; %p A052421 while m>0 do l:= (d-> %p A052421 `if`(d<8, d, d+1))(irem(m, 9, 'm')), l %p A052421 od; parse(cat(l))/10 %p A052421 end: %p A052421 seq(a(n), n=1..100); # _Alois P. Heinz_, Aug 01 2016 %t A052421 Select[Range[0,100],DigitCount[#,10,8]==0&] (* _Harvey P. Dale_, Oct 11 2012 *) %o A052421 (Magma) [ n: n in [0..89] | not 8 in Intseq(n) ]; // _Bruno Berselli_, May 28 2011 %o A052421 (sh) seq 0 1000 | grep -v 8; # _Joerg Arndt_, May 29 2011 %o A052421 (Haskell) %o A052421 a052421 = f . subtract 1 where %o A052421 f 0 = 0 %o A052421 f v = 10 * f w + if r > 7 then r + 1 else r where (w, r) = divMod v 9 %o A052421 -- _Reinhard Zumkeller_, Oct 07 2014 %o A052421 (PARI) lista(nn)=for (n=0, nn, if (!vecsearch(vecsort(digits(n),,8), 8), print1(n, ", "));); \\ _Michel Marcus_, Feb 22 2015 %o A052421 (PARI) /* See OEIS wiki page (cf. LINKS) for more programs. */ %o A052421 apply( {A052421(n)=fromdigits(apply(d->d+(d>7),digits(n-1,9)))}, [1..99]) \\ a(n) %o A052421 select( {is_A052421(n)=!setsearch(Set(digits(n)),8)}, [0..99]) \\ used in A038616 %o A052421 next_A052421(n, d=digits(n+=1))={for(i=1,#d, d[i]==8&&return((1+n\d=10^(#d-i))*d)); n} \\ Least a(k) > n. Used in A038616. - _M. F. Hasler_, Jan 11 2020 %o A052421 (Python) %o A052421 from gmpy2 import digits %o A052421 def A052421(n): return int(digits(n-1,9).replace('8','9')) # _Chai Wah Wu_, Jun 28 2025 %Y A052421 Cf. A004183, A004727, A038616 (subset of primes), A082837 (Kempner series). %Y A052421 Cf. A052382 (without 0), A052383 (without 1), A052404 (without 2), A052405 (without 3), A052406 (without 4), A052413 (without 5), A052414 (without 6), A052419 (without 7), A007095 (without 9). %K A052421 base,easy,nonn %O A052421 1,3 %A A052421 _Henry Bottomley_, Mar 13 2000 %E A052421 Offset changed by _Reinhard Zumkeller_, Oct 07 2014