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 A052406 #53 Jun 28 2025 14:51:40 %S A052406 0,1,2,3,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20,21,22,23,25,26,27,28, %T A052406 29,30,31,32,33,35,36,37,38,39,50,51,52,53,55,56,57,58,59,60,61,62,63, %U A052406 65,66,67,68,69,70,71,72,73,75,76,77,78,79,80,81,82,83,85,86,87,88,89 %N A052406 Numbers without 4 as a digit. %C A052406 This is a frequent sequence on Chinese, Japanese and Korean elevator buttons. - Jean-Sebastien Girard (circeus(AT)hotmail.com), Jul 28 2008 %C A052406 Essentially numbers in base 9 (using digits 0, 1, 2, 3, 5, 6, 7, 8, 9 rather than 0-8). - _Charles R Greathouse IV_, Oct 13 2013 %H A052406 Reinhard Zumkeller, <a href="/A052406/b052406.txt">Table of n, a(n) for n = 1..10000</a> %H A052406 M. F. Hasler, <a href="/wiki/Numbers_avoiding_certain_digits">Numbers avoiding certain digits</a> OEIS wiki, Jan 12 2020. %H A052406 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/UbanNumber.html">Uban Number</a> %H A052406 Wikipedia, <a href="http://en.wikipedia.org/wiki/Tetraphobia">Tetraphobia</a>. %H A052406 <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>. %F A052406 a(n) = replace digits d > 3 by d + 1 in base-9 representation of n - 1. - _Reinhard Zumkeller_, Oct 07 2014 %F A052406 Sum_{k>1} 1/a(k) = A082833 = 21.327465... (Kempner series). - _Bernard Schott_, Jan 12 2020, edited by _M. F. Hasler_, Jan 13 2020 %p A052406 a:= proc(n) local l, m; l, m:= 0, n-1; %p A052406 while m>0 do l:= (d-> %p A052406 `if`(d<4, d, d+1))(irem(m, 9, 'm')), l %p A052406 od; parse(cat(l))/10 %p A052406 end: %p A052406 seq(a(n), n=1..100); # _Alois P. Heinz_, Aug 01 2016 %t A052406 Select[Range[100], DigitCount[#, 10, 4] == 0 &] (* _Alonso del Arte_, Oct 13 2013 *) %o A052406 (PARI) g(n)= local(x,v,j,flag); for(x=1,n, v=Vec(Str(x)); flag=1; for(j=1,length(v), if(v[j]=="4",flag=0)); if(flag,print1(x",") ) ) \\ _Cino Hilliard_, Apr 01 2007 %o A052406 (PARI) %o A052406 apply( {A052406(n)=fromdigits(apply(d->d+(d>3),digits(n-1,9)))}, [1..99]) \\ a(n) %o A052406 select( {is_A052406(n)=!setsearch(Set(digits(n)),4)}, [0..99]) \\ Used in A038612 %o A052406 next_A052406(n, d=digits(n+=1))={for(i=1, #d, d[i]!=4|| return((1+n\d=10^(#d-i))*d)); n} \\ least a(k) > n. Used for A038612. - _M. F. Hasler_, Jan 11 2020 %o A052406 (Magma) [ n: n in [0..89] | not 4 in Intseq(n) ]; // _Bruno Berselli_, May 28 2011 %o A052406 (sh) seq 0 1000 | grep -v 4; # _Joerg Arndt_, May 29 2011 %o A052406 (Haskell) %o A052406 a052406 = f . subtract 1 where %o A052406 f 0 = 0 %o A052406 f v = 10 * f w + if r > 3 then r + 1 else r where (w, r) = divMod v 9 %o A052406 -- _Reinhard Zumkeller_, Oct 07 2014 %o A052406 (Python) def A052406(n): n-=1; return sum((d+(d>3))*10**i for d,i in ((n//9**i%9,i) for i in range(math.ceil(math.log(n+1,9))))) # _M. F. Hasler_, Jan 13 2020 %o A052406 (Python) %o A052406 from gmpy2 import digits %o A052406 def A052406(n): return int(digits(n-1,9).translate(str.maketrans('45678','56789'))) # _Chai Wah Wu_, Jun 28 2025 %Y A052406 Cf. A004179, A004723, A011760, A038612 (subset of primes), A082833 (Kempner series). %Y A052406 Cf. A052382 (without 0), A052383 (without 1), A052404 (without 2), A052405 (without 3), A052413 (without 5), A052414 (without 6), A052419 (without 7), A052421 (without 8), A007095 (without 9). %K A052406 base,easy,nonn %O A052406 1,3 %A A052406 _Henry Bottomley_, Mar 13 2000 %E A052406 Offset changed by _Reinhard Zumkeller_, Oct 07 2014