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 A004724 #39 Apr 22 2021 22:09:13 %S A004724 0,1,2,3,4,6,7,8,9,10,11,12,13,14,1,16,17,18,19,20,21,22,23,24,2,26, %T A004724 27,28,29,30,31,32,33,34,3,36,37,38,39,40,41,42,43,44,4,46,47,48,49,0, %U A004724 1,2,3,4,6,7,8,9,60,61,62,63,64,6,66,67,68,69,70,71,72,73,74,7,76 %N A004724 Delete all 5's from the sequence of nonnegative integers. %C A004724 In contrast to the variant A004180 where a(n) = 0 when all the digits of n are 5's, here a number completely disappears in that case, so that subsequent indices are shifted and for n > 4, a(n) is not the result of deleting 5's from n: see formula. - _M. F. Hasler_, Jan 13 2020 %F A004724 a(n) = A004180(n + m) where m = L(n) - [ (10^L(n)-1)/9*5 >= n + L(n) ], L(n) = floor(log_10(max(n,1)) + 1), the number of digits of n, and [...] is the Iverson bracket (1 if true, 0 else). - _M. F. Hasler_, Jan 13 2020 %e A004724 From _M. F. Hasler_, Jan 13 2020: (Start) %e A004724 After a(4) = 4 comes a(5) = 6, since the number 5 completely disappears. %e A004724 a(48) = 49 is followed by 0, 1, 2, 3, 4 (i.e., 50, ..., 54 with the initial digit removed) and then a(54) = 6, because 55 disappears completely. %e A004724 Illustration of the formula: as long as n < 5 (the first number that completely disappears) we have a(n) = A004180(n). Here n has 1 digit but n+1 does not exceed the (single repdigit) 5 (left hand side in the Iverson bracket), so m = 0. From n = 5 on, n+1 > 5, so m = 1. %e A004724 Then, when n has L(n) = 2 digits, we still have n = 2 - 1 = 1 as long as n+2 <= 55 or n <= 53, but m = 3 for n > 55 - 2 = 53, i.e., from n = 54 on (where the term 55 has disappeared, see above). %e A004724 Similarly, m = 3 for n > 555 - 3, i.e., from n >= 553 on, etc. (End) %o A004724 (PARI) %o A004724 apply( {A004724(n,L=logint(n+!n,10)+1)=A004180(n+L-(10^L\9*5-L>=n))}, [0..99]) %o A004724 A004724_upto(N)={[fromdigits(v)|v<-[[d|d<-digits(n+!n*50),d!=5]|n<-[0..N]],#v]} \\ _M. F. Hasler_, Jan 13 2020 %o A004724 (MATLAB) m=1; for u=0:76 v=dec2base(u, 10)-'0'; v = v(v~=5); if length(v)>0; sol(m)=(str2num(strrep(num2str(v), ' ', ''))); m=m+1; end; end; sol % _Marius A. Burtea_, Jan 16 2020 %o A004724 (Python) %o A004724 def A004724(n): %o A004724 l = len(str(n)) %o A004724 m = 5*(10**l-1)//9 %o A004724 k = n + l - int(n+l < m) %o A004724 return 4 if k == m else int(str(k).replace('5','')) # _Chai Wah Wu_, Apr 20 2021 %Y A004724 Cf. A004180 (delete digits 5 in n), A052413 (numbers with no digit 5). %Y A004724 Cf. A004719, A004720, A004721, A004722, A004723, A004725, A004726, A004727, A004728. %K A004724 base,nonn %O A004724 0,3 %A A004724 _N. J. A. Sloane_