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!)
A004721 Delete all 2's from the sequence of nonnegative integers. 10
0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 13, 14, 15, 16, 17, 18, 19, 0, 1, 3, 4, 5, 6, 7, 8, 9, 30, 31, 3, 33, 34, 35, 36, 37, 38, 39, 40, 41, 4, 43, 44, 45, 46, 47, 48, 49, 50, 51, 5, 53, 54, 55, 56, 57, 58, 59, 60, 61, 6, 63, 64, 65, 66, 67, 68, 69, 70, 71, 7, 73, 74, 75 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
MATHEMATICA
d[n_]:=IntegerDigits[n]; t={0}; Do[If[Union[d[n]]!={2}, n=FromDigits[DeleteCases[d[n], 2]]; AppendTo[t, n]], {n, 75}]; t (* Jayanta Basu, May 17 2013 *)
PROG
(Python)
def A004721(n):
l = len(str(n))
m = 2*(10**l-1)//9
k = n + l - int(n+l < m)
return 1 if k == m else int(str(k).replace('2', '')) # Chai Wah Wu, Apr 20 2021
CROSSREFS
Sequence in context: A154781 A118716 A004177 * A333838 A030544 A141213
KEYWORD
base,nonn
AUTHOR
STATUS
approved

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 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)