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 A004722 #49 Apr 22 2021 22:08:57 %S A004722 0,1,2,4,5,6,7,8,9,10,11,12,1,14,15,16,17,18,19,20,21,22,2,24,25,26, %T A004722 27,28,29,0,1,2,4,5,6,7,8,9,40,41,42,4,44,45,46,47,48,49,50,51,52,5, %U A004722 54,55,56,57,58,59,60,61,62,6,64,65,66,67,68,69,70,71,72,7,74,75,76 %N A004722 Delete all digits 3 from the terms of the sequence of nonnegative integers. %C A004722 Very similar to A004178, except that 3-repdigits (A002277) are completely removed from the sequence, whereas A004178 has 0's in their place. It is thus guaranteed that a(n) = n only when n < 3. - _Alonso del Arte_, Oct 18 2012 %H A004722 Alonso del Arte, <a href="/A004722/b004722.txt">Table of n, a(n) for n = 0..9999</a> %F A004722 a(n) = n for -1 < n < 3; %F A004722 a(n) = A004178(n + 1) for 2 < n < 32, %F A004722 a(n) = A004178(n + 2) for 31 < n < 331, %F A004722 a(n) = A004178(n + 3) for 330 < n < 3330, %F A004722 a(n) = A004178(n + 4) for 3329 < n < 33329, etc. - _Alonso del Arte_, Oct 21 2012 %t A004722 endAt = 103; Delete[Table[FromDigits[DeleteCases[IntegerDigits[n], 3]], {n, 0, endAt}], Table[{(10^expo - 1)/3 + 1}, {expo, Floor[Log[10, endAt]]}]] (* _Alonso del Arte_, Apr 29 2019 *) %o A004722 (MATLAB) m=1; %o A004722 for u=0:1000 %o A004722 v=dec2base(u,10)-'0'; v = v(v~=3); %o A004722 if length(v)>0;sol(m)=(str2num(strrep(num2str(v), ' ', ''))); m=m+1; end; %o A004722 end %o A004722 sol % _Marius A. Burtea_, May 07 2019 %o A004722 (Python) %o A004722 def A004722(n): %o A004722 l = len(str(n)) %o A004722 m = (10**l-1)//3 %o A004722 k = n + l - int(n+l < m) %o A004722 return 2 if k == m else int(str(k).replace('3','')) # _Chai Wah Wu_, Apr 20 2021 %Y A004722 Cf. A004719, A004720, A004721, A004723, A004724, A004725, A004726, A004727, A004728. %K A004722 base,nonn %O A004722 0,3 %A A004722 _N. J. A. Sloane_ %E A004722 _Sean A. Irvine_ pointed out erroneous terms in b-file and confirmed correction, Apr 28 2019 %E A004722 Name edited by _Felix Fröhlich_, Apr 29 2019