cp's OEIS Frontend

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.

A004723 Delete all 4's from the sequence of nonnegative integers.

This page as a plain text file.
%I A004723 #28 Apr 22 2021 22:09:05
%S A004723 0,1,2,3,5,6,7,8,9,10,11,12,13,1,15,16,17,18,19,20,21,22,23,2,25,26,
%T A004723 27,28,29,30,31,32,33,3,35,36,37,38,39,0,1,2,3,5,6,7,8,9,50,51,52,53,
%U A004723 5,55,56,57,58,59,60,61,62,63,6,65,66,67,68,69,70,71,72,73,7,75
%N A004723 Delete all 4's from the sequence of nonnegative integers.
%C A004723 Differs from A004179 where A004179(4) = A004179(44) = A004179(444) = ... = 0. - _Michel Marcus_, May 17 2019
%H A004723 Robert Israel, <a href="/A004723/b004723.txt">Table of n, a(n) for n = 0..10000</a>
%p A004723 f:= proc(n) local L,i;
%p A004723   L:= subs(4=NULL, convert(n,base,10));
%p A004723   if L = [] then return NULL fi;
%p A004723   add(L[i]*10^(i-1),i=1..nops(L))
%p A004723 end proc:
%p A004723 map(f, [$0..100]); # _Robert Israel_, May 17 2019
%o A004723 (MATLAB) m=1;
%o A004723 for u=0:150
%o A004723 v=dec2base(u, 10)-'0'; v = v(v~=4);
%o A004723   if length(v)>0;sol(m)=(str2num(strrep(num2str(v), ' ', ''))); m=m+1; end;
%o A004723 end;
%o A004723 sol % _Marius A. Burtea_, May 17 2019
%o A004723 (Python)
%o A004723 def A004723(n):
%o A004723     l = len(str(n))
%o A004723     m = 4*(10**l-1)//9
%o A004723     k = n + l - int(n+l < m)
%o A004723     return 3 if k == m else int(str(k).replace('4','')) # _Chai Wah Wu_, Apr 20 2021
%Y A004723 Cf. A004179.
%Y A004723 Cf. A004719, A004720, A004721, A004722, A004724, A004725, A004726, A004727, A004728.
%K A004723 base,nonn,look
%O A004723 0,3
%A A004723 _N. J. A. Sloane_