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.

A004180 Omit 5's from n.

This page as a plain text file.
%I A004180 #18 Jan 14 2020 05:32:35
%S A004180 0,1,2,3,4,0,6,7,8,9,10,11,12,13,14,1,16,17,18,19,20,21,22,23,24,2,26,
%T A004180 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 A004180 1,2,3,4,0,6,7,8,9,60,61,62,63,64,6,66,67,68,69,70,71,72,73,74
%N A004180 Omit 5's from n.
%C A004180 See A004724 for a variant where a(n) disappears when n has only digits 5. - _M. F. Hasler_, Jan 13 2020
%t A004180 Table[FromDigits[DeleteCases[IntegerDigits[n], 5]], {n, 0, 79}] (* _Harvey P. Dale_, Jan 20 2015 *)
%o A004180 (PARI) a(n)=subst(Pol(select(k->k-5,digits(n))),'x,10) \\ _Charles R Greathouse IV_, Oct 16 2012
%o A004180 (PARI) A004180(n)=fromdigits([d|d<-digits(n),d!=5]) \\ _M. F. Hasler_, Jan 13 2020
%o A004180 (Scala) (0 to 99).map(n => try {
%o A004180   Integer.parseInt(Integer.toString(n).replace("5", ""))
%o A004180 } catch {
%o A004180   case _: NumberFormatException => 0
%o A004180 }) // _Alonso del Arte_, Jan 13 2020
%o A004180 (MATLAB) for u=0:74 ; v=dec2base(u, 10)-'0'; v = v(v~=5); if length(v)>0; sol(u+1)=(str2num(strrep(num2str(v), ' ', ''))); else; sol(u+1)=0; end; end; sol % _Marius A. Burtea_, Jan 13 2020
%Y A004180 Cf. A004724.
%K A004180 nonn,base,easy
%O A004180 0,3
%A A004180 _N. J. A. Sloane_