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 A052404 #79 Apr 19 2025 05:57:09 %S A052404 0,1,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,30,31,33,34,35,36,37,38, %T A052404 39,40,41,43,44,45,46,47,48,49,50,51,53,54,55,56,57,58,59,60,61,63,64, %U A052404 65,66,67,68,69,70,71,73,74,75,76,77,78,79,80,81,83,84,85,86,87,88,89 %N A052404 Numbers without 2 as a digit. %D A052404 M. J. Halm, Word Weirdness, Mpossibilities 66 (Feb. 1998), p. 5. %H A052404 Reinhard Zumkeller, <a href="/A052404/b052404.txt">Table of n, a(n) for n = 1..10000</a> %H A052404 M. J. Halm, <a href="http://michaelhalm.tripod.com/id76.htm">Games</a> %H A052404 M. F. Hasler, <a href="/wiki/Numbers_avoiding_certain_digits">Numbers avoiding certain digits</a>, OEIS Wiki, Jan 12 2020. %H A052404 <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>. %F A052404 If the offset were changed to 0: a(0) = 0, a(n+1) = f(a(n)+1,a(n)+1) where f(x,y) = if x<10 and x<>2 then y else if x mod 10 = 2 then f(y+1,y+1) else f(floor(x/10),y). - _Reinhard Zumkeller_, Mar 02 2008 %F A052404 a(n) = replace digits d > 1 by d + 1 in base-9 representation of n - 1. - _Reinhard Zumkeller_, Oct 07 2014 %F A052404 Sum_{k>1} 1/a(k) = A082831 = 19.257356... (Kempner series). - _Bernard Schott_, Jan 12 2020, edited by _M. F. Hasler_, Jan 14 2020 %p A052404 a:= proc(n) local l, m; l, m:= 0, n-1; %p A052404 while m>0 do l:= (d-> %p A052404 `if`(d<2, d, d+1))(irem(m, 9, 'm')), l %p A052404 od; parse(cat(l))/10 %p A052404 end: %p A052404 seq(a(n), n=1..100); # _Alois P. Heinz_, Aug 01 2016 %t A052404 ban2Q[n_]:=FreeQ[IntegerDigits[n],2]==True; Select[Range[0,89],ban2Q[#] &] (* _Jayanta Basu_, May 17 2013 *) %t A052404 Select[Range[0,100],DigitCount[#,10,2]==0&] (* _Harvey P. Dale_, Apr 13 2015 *) %o A052404 (Magma) [ n: n in [0..89] | not 2 in Intseq(n) ]; // _Bruno Berselli_, May 28 2011 %o A052404 (sh) seq 0 1000 | grep -v 2; # _Joerg Arndt_, May 29 2011 %o A052404 (Haskell) %o A052404 a052404 = f . subtract 1 where %o A052404 f 0 = 0 %o A052404 f v = 10 * f w + if r > 1 then r + 1 else r where (w, r) = divMod v 9 %o A052404 -- _Reinhard Zumkeller_, Oct 07 2014 %o A052404 (PARI) lista(nn, d=2) = {for (n=0, nn, if (!vecsearch(vecsort(digits(n),,8),d), print1(n, ", ")););} \\ _Michel Marcus_, Feb 21 2015 %o A052404 (PARI) %o A052404 apply( {A052404(n)=fromdigits(apply(d->d+(d>1),digits(n-1,9)))}, [1..99]) %o A052404 next_A052404(n, d=digits(n+=1))={for(i=1, #d, d[i]==2&&return((1+n\d=10^(#d-i))*d)); n} \\ least a(k) > n: if there's a digit 2 in n+1, replace the first occurrence by 3 and all following digits by 0. %o A052404 (A052404_vec(N)=vector(N, i, N=if(i>1, next_A052404(N))))(99) \\ first N terms %o A052404 select( {is_A052404(n)=!setsearch(Set(digits(n)),2)}, [0..99]) %o A052404 (A052404_upto(N)=select( is_A052404, [0..N]))(99) \\ _M. F. Hasler_, Jan 11 2020 %o A052404 (Python) %o A052404 from gmpy2 import digits %o A052404 def A052404(n): return int(''.join(str(int(d)+1) if d>'1' else d for d in digits(n-1,9))) # _Chai Wah Wu_, Aug 30 2024 %Y A052404 Cf. A004177, A004721, A072809, A082831 (Kempner series). %Y A052404 Cf. A052382 (without 0), A052383 (without 1), A052405 (without 3), A052406 (without 4), A052413 (without 5), A052414 (without 6), A052419 (without 7), A052421 (without 8), A007095 (without 9). %Y A052404 See A038604 for the subset of primes. - _M. F. Hasler_, Jan 11 2020 %K A052404 base,easy,nonn %O A052404 1,3 %A A052404 _Henry Bottomley_, Mar 13 2000 %E A052404 Offset changed by _Reinhard Zumkeller_, Oct 07 2014