login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004725 Delete all 6's from the sequence of nonnegative integers. 9

%I #21 Apr 22 2021 22:09:21

%S 0,1,2,3,4,5,7,8,9,10,11,12,13,14,15,1,17,18,19,20,21,22,23,24,25,2,

%T 27,28,29,30,31,32,33,34,35,3,37,38,39,40,41,42,43,44,45,4,47,48,49,

%U 50,51,52,53,54,55,5,57,58,59,0,1,2,3,4,5,7,8,9,70,71,72,73,74,75,7

%N Delete all 6's from the sequence of nonnegative integers.

%t d6[n_]:=Module[{c=DeleteCases[IntegerDigits[n],6]},If[c=={},Nothing, FromDigits[ c]]]; Array[d6,80,0] (* _Harvey P. Dale_, Oct 09 2017 *)

%o (Python)

%o def A004725(n):

%o l = len(str(n))

%o m = 2*(10**l-1)//3

%o k = n + l - int(n+l < m)

%o return 5 if k == m else int(str(k).replace('6','')) # _Chai Wah Wu_, Apr 20 2021

%Y Cf. A004719, A004720, A004721, A004722, A004723, A004724, A004726, A004727, A004728.

%K base,nonn

%O 0,3

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)